Jump to content
Sign in to follow this  
nana

fast easy checkout

Recommended Posts

This is one of the best contribs that has been needed for a VERY long time, thanks alot.

 

Looking forward how this will get even better as time goes.

Share this post


Link to post
Share on other sites

Great contrib :thumbsup:

I am only using the combine checkout_payment and shipping bit and it works fine. The only problem i get is that at the bottom of the page i get a page error when i click continue to confirmation even though it all appears to work.

I don't use a shipping module so it might be something to do with that. I also only have SECPay as a payment method. It could also be to do with this as i didn't understand what mods need doing to the checkout_confirmation.php if any to account for this. As it says in the instructions to modify it to suit!

Can anyone help me out finding the problem?

I have uploaded the new checkout shipping and modified the other two files as instructed, i have also tried uploading all the files from the contri as replacements and get the same error!

 

The error is as follows:-

Line: 119

Char: 1

Error: Object Expected

Code: 0

URL: https://www.jbleisure.co.uk/checkout_shipping.php?n=1

 

Any help on this greatly appreciated as my site goes live tomorrow!!!!! well the adverts do anyway.

 

TIA

 

Julian


A little knowledge is dangerous, I SHOULD KNOW.

If Life Begins At 40, What ends????

Share this post


Link to post
Share on other sites

julianpuje

i just checked your site and had no problem i guess you fixed it

i do not know how but i guess there has to be a way to just go to checkout_confirmation since there is nothing to do in checkout_shopping.i do not think it should be too hard

Share this post


Link to post
Share on other sites

you do not to make any additional changes in the checkout_confirmation.php

that is only for people that collect cc# on their site

Share this post


Link to post
Share on other sites
julianpuje

i just checked your site and had no problem i guess you fixed it

i do not know how but i guess there has to be a way to just go to checkout_confirmation since there is nothing to do in checkout_shopping.i do not think it should be too hard

 

The problem is still there, you probably didn't notice it. Right at the bottom left of the page when you click to continue to checkout_confirmation there is an error that flashes up. I can get it to stay by activating another payment module. If you can take another look for me please. Doing it this way, as soon as you select a payment method the error appears at the bottom left, if you click on that you'll see what the error is.

 

Thanks for taking a look and hope you find time to look again.

 

Thanks

 

Julian

 

 

My Webpage


A little knowledge is dangerous, I SHOULD KNOW.

If Life Begins At 40, What ends????

Share this post


Link to post
Share on other sites

i am at work now and i really do not have time to figure out what is wrong with your code till sunday

why don't you use this checkout_shipping.php i post here i just removed the left and right column other than that i just copied it from my site and and let me know if it works for you

<?php
/*
$Id: checkout_shipping.php,v 1.16 2003/06/09 23:03:53 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License

*/
require('includes/application_top.php');
require('includes/classes/http_client.php');

require(DIR_WS_CLASSES . 'order.php');
$order = new order;
require(DIR_WS_CLASSES . 'payment.php');
$payment_modules = new payment;


$total_weight = $cart->show_weight();
$total_count = $cart->count_contents();


require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping;

//the next 4 lines are for ccgv
/* require(DIR_WS_CLASSES . 'order_total.php');

$order_total_modules = new order_total;
$order_total_modules->collect_posts();
$order_total_modules->pre_confirmation_check(); */
// if the customer is not logged on, redirect them to the login page
if (!tep_session_is_registered('customer_id')) {
$navigation->set_snapshot();
// tep_redirect(tep_href_link('create_account3.php', '', 'SSL'));
tep_redirect(tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
}

// if there is nothing in the customers cart, redirect them to the shopping cart page
if ($cart->count_contents() < 1) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
}
// if no shipping destination address was selected, use the customers own address as default
if (!tep_session_is_registered('sendto')) {
tep_session_register('sendto');
$sendto = $customer_default_address_id;
} else {
// verify the selected shipping address
$check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'");
$check_address = tep_db_fetch_array($check_address_query);

if ($check_address['total'] != '1') {
$sendto = $customer_default_address_id;
if (tep_session_is_registered('shipping')) tep_session_unregister('shipping');
}
}
// if no billing destination address was selected, use the customers own address as default
if (!tep_session_is_registered('billto')) {
tep_session_register('billto');
$billto = $customer_default_address_id;
} else {
// verify the selected billing address
$check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$billto . "'");
$check_address = tep_db_fetch_array($check_address_query);

if ($check_address['total'] != '1') {
$billto = $customer_default_address_id;
if (tep_session_is_registered('payment')) tep_session_unregister('payment');
}
}


// register a random ID in the session to check throughout the checkout procedure
// against alterations in the shopping cart contents
if (!tep_session_is_registered('cartID')) tep_session_register('cartID');
$cartID = $cart->cartID;

// if the order contains only virtual products, forward the customer to the billing page as
// a shipping address is not needed
if ($order->content_type == 'virtual') {
if (!tep_session_is_registered('shipping')) tep_session_register('shipping');
$shipping = false;
$sendto = false;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}
tep_session_unregister('billing');
tep_session_unregister('payment');
if (isset($HTTP_POST_VARS['payment'])) $payment = $HTTP_POST_VARS['payment'];
if (!tep_session_is_registered('payment')) tep_session_register('payment');




if($n==1){
if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));

tep_session_unregister('payment');
$payment_modules->update_status();
}
if (is_array($payment_modules->modules)) {
$payment_modules->pre_confirmation_check();
}
}
while (list($key, $value) = each($_POST))
{
tep_session_register($key);
}
if ( defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') ) {
$pass = false;

switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
case 'national':
if ($order->delivery['country_id'] == STORE_COUNTRY) {
$pass = true;
}
break;
case 'international':
if ($order->delivery['country_id'] != STORE_COUNTRY) {
$pass = true;
}
break;
case 'both':
$pass = true;
break;
}

$free_shipping = false;
if ( ($pass == true) && ($order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) ) {
$free_shipping = true;

include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
}
} else {
$free_shipping = false;
}

// process the selected shipping method
if ( isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') ) {
if (!tep_session_is_registered('comments')) tep_session_register('comments');
if (tep_not_null($HTTP_POST_VARS['comments'])) {
$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
}

if (!tep_session_is_registered('shipping')) tep_session_register('shipping');

if ( (tep_count_shipping_modules() > 0) || ($free_shipping == true) ) {
if ( (isset($HTTP_POST_VARS['shipping'])) && (strpos($HTTP_POST_VARS['shipping'], '_')) ) {
$shipping = $HTTP_POST_VARS['shipping'];

list($module, $method) = explode('_', $shipping);
if ( is_object($$module) || ($shipping == 'free_free') ) {
if ($shipping == 'free_free') {
$quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
$quote[0]['methods'][0]['cost'] = '0';
} else {
$quote = $shipping_modules->quote($method, $module);
}
if (isset($quote['error'])) {
tep_session_unregister('shipping');
} else {
if ( (isset($quote[0]['methods'][0]['title'])) && (isset($quote[0]['methods'][0]['cost'])) ) {
$shipping = array('id' => $shipping,
'title' => (($free_shipping == true) ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')'),
'cost' => $quote[0]['methods'][0]['cost']);

tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION,'', 'SSL'));
}
}
} else {
tep_session_unregister('shipping');
}
}
} else {
$shipping = false;

tep_redirect(tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL'));
}
}

// get all available shipping quotes
$quotes = $shipping_modules->quote();

// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
if ( !tep_session_is_registered('shipping') || ( tep_session_is_registered('shipping') && ($shipping == false) && (tep_count_shipping_modules() > 1) ) ) $shipping = $shipping_modules->cheapest();

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT);
require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SHIPPING);

$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));

?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">

<?php echo $payment_modules->javascript_validation(); ?>
<script language="javascript"><!--
var selected;

function selectRowEffect2(object, buttonSelect) {
 if (!selected) {
if (document.getElementById) {
  selected = document.getElementById('defaultSelected');
} else {
  selected = document.all['defaultSelected'];
}
 }

 if (selected) selected.className = 'moduleRow';
 object.className = 'moduleRowSelected2';
 selected = object;

// one button is not an array
 if (document.checkout_payment.shipping[0]) {
document.checkout_payment.shipping[buttonSelect].checked=true;
 } else {
document.checkout_payment.shipping.checked=true;
 }
}

function rowOverEffect(object) {
 if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
//--></script>
<script language="javascript"><!--
var selected;
<?php//rmh M-S_ccgv begin ?>
var submitter = null;
function submitFunction() {
  submitter = 1;
  }
<?php//rmh M-S_ccgv end ?>
function selectRowEffect(object, buttonSelect) {
 if (!selected) {
if (document.getElementById) {
  selected = document.getElementById('defaultSelected');
} else {
  selected = document.all['defaultSelected'];
}
 }

 if (selected) selected.className = 'moduleRow';
 object.className = 'moduleRowSelected';
 selected = object;

// one button is not an array
 if (document.checkout_payment.payment[0]) {
document.checkout_payment.payment[buttonSelect].checked=true;
 } else {
document.checkout_payment.payment.checked=true;
 }
}

function rowOverEffect(object) {
 if (object.className == 'moduleRow') object.className = 'moduleRowOver';
}

function rowOutEffect(object) {
 if (object.className == 'moduleRowOver') object.className = 'moduleRow';
}
//--></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php// echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php// echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php //require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
  <!-- body_text //-->
<td width="100%" valign="top"><?php echo tep_draw_form('checkout_payment', tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'n=1', 'SSL'), 'post', 'onsubmit="return check_form();"') . tep_draw_hidden_field('action', 'process'); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading"><?php echo HEADING_TITLE;
//echo $ZETA; ?></td>
		<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_payment.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if (isset($HTTP_GET_VARS['payment_error']) && is_object(${$HTTP_GET_VARS['payment_error']}) && ($error = ${$HTTP_GET_VARS['payment_error']}->get_error())) {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo tep_output_string_protected($error['title']); ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td>
	<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBoxNotice">
	  <tr class="infoBoxNoticeContents">
		<td>
		<table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="100%" valign="top"><?php echo tep_output_string_protected($error['error']); ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table>
   </td>
	  </tr>
	</table>
<?php
 }
?>
  </td>
	<td>
	<table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		   </tr>
	</table></td>
  </tr>
<?php

 if (!tep_session_is_registered('registered_now')) {

?>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td>
		<table border="0" width="50%" cellspacing="0" cellpadding="2">
		  <tr>

		   <td align="left" valign="top">
		   <table border="0" cellspacing="0" cellpadding="2">
			  <tr>
			  <td class="main"><b><?php echo TABLE_HEADING_SHIPPING_ADDRESS; ?></b></td>
			  </tr>
			  <tr>
			   <td class="main" valign="top"><?php echo tep_address_label($customer_id, $sendto, true, ' ', '<br>'); ?></td>
			   </tr><tr>
			  <td class="main"  valign="top"><?php echo  '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>
			  </tr>
			</table>
			</td> </tr>
			</table>
			</td>
			<td>
			<table border="0" width="50%" cellspacing="0" cellpadding="2">
		  <tr>
		   <td align="right"  valign="top">
		   <table border="0" cellspacing="0" cellpadding="2">
			  <tr>
			 <td class="main"><b><?php echo TABLE_HEADING_BILLING_ADDRESS; ?></b></td>
			 </tr>
			 <tr>
			  <td class="main" valign="top"><?php echo tep_address_label($customer_id, $billto, true, ' ', '<br>'); ?></td></tr>
				<tr>
			  <td class="main"  valign="top"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '">' . tep_image_button('button_change_address.gif', IMAGE_BUTTON_CHANGE_ADDRESS) . '</a>'; ?></td>
		  </tr>

			</table></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
<?php

}

?>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_PAYMENT_METHOD; ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
 $selection = $payment_modules->selection();

 if (sizeof($selection) > 1) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="50%" valign="top"><?php echo TEXT_SELECT_PAYMENT_METHOD; ?></td>
			<td class="main" width="50%" valign="top" align="right"><b><?php echo TITLE_PLEASE_SELECT; ?></b><br><?php echo tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
 } else {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_PAYMENT_INFORMATION; ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
 }

 $radio_buttons = 0;
 for ($i=0, $n=sizeof($selection); $i<$n; $i++) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
if ( ($selection[$i]['id'] == $payment) || ($n == 1) ) {
  echo '				  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
} else {
  echo '				  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
}
?>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><b><?php echo $selection[$i]['module']; ?></b></td>
				<td class="main" align="right">
<?php
if (sizeof($selection) > 1) {
  echo tep_draw_radio_field('payment', $selection[$i]['id']);
} else {
  echo tep_draw_hidden_field('payment', $selection[$i]['id']);
}
?>
				</td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
if (isset($selection[$i]['error'])) {
?>
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="4"><?php echo $selection[$i]['error']; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
} elseif (isset($selection[$i]['fields']) && is_array($selection[$i]['fields'])) {
?>
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td colspan="4"><table border="0" cellspacing="0" cellpadding="2">
<?php
  for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
?>
				  <tr>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
					<td class="main"><?php echo $selection[$i]['fields'][$j]['title']; ?></td>
					<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
					<td class="main"><?php echo $selection[$i]['fields'][$j]['field']; ?></td>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				  </tr>
<?php
  }
?>
				</table></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
}
?>
			</table></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
$radio_buttons++;
 }
?>
		</table></td>
	  </tr>
	</table></td>
  </tr>

   <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 if (tep_count_shipping_modules() > 0) {
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_SHIPPING_METHOD; ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="50%" valign="top"><?php echo TEXT_CHOOSE_SHIPPING_METHOD; ?></td>
			<td class="main" width="50%" valign="top" align="right"><?php echo '<b>' . TITLE_PLEASE_SELECT . '</b><br>' . tep_image(DIR_WS_IMAGES . 'arrow_east_south.gif'); ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
} elseif ($free_shipping == false) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="100%" colspan="2"><?php echo TEXT_ENTER_SHIPPING_INFORMATION; ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
}

if ($free_shipping == true) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td colspan="2" width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="2">
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><b><?php echo FREE_SHIPPING_TITLE; ?></b>?<?php echo $quotes[$i]['icon']; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
			  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, 0)">
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" width="100%"><?php echo sprintf(FREE_SHIPPING_DESCRIPTION, $currencies->format(MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER)) . tep_draw_hidden_field('shipping', 'free_free'); ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
			</table></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
} else {
  $radio_buttons = 0;
  for ($i=0, $n=sizeof($quotes); $i<$n; $i++) {
?>
		  <tr>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td colspan="2"><table border="0" width="100%" cellspacing="0" cellpadding="2">
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><b><?php echo $quotes[$i]['module']; ?></b>?<?php if (isset($quotes[$i]['icon']) && tep_not_null($quotes[$i]['icon'])) { echo $quotes[$i]['icon']; } ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
	if (isset($quotes[$i]['error'])) {
?>
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" colspan="3"><?php echo $quotes[$i]['error']; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
	} else {
	  for ($j=0, $n2=sizeof($quotes[$i]['methods']); $j<$n2; $j++) {
// set the radio button to be checked if it is the method chosen
		$checked = (($quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'] == $shipping['id']) ? true : false);

		if ( ($checked == true) || ($n == 1 && $n2 == 1) ) {
		  echo '				  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect2(this, ' . $radio_buttons . ')">' . "\n";
		} else {
		  echo '				  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect2(this, ' . $radio_buttons . ')">' . "\n";
		}
?>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" width="75%"><?php echo $quotes[$i]['methods'][$j]['title']; ?></td>
<?php
		if ( ($n > 1) || ($n2 > 1) ) {
?>
				<td class="main"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?></td>
				<td class="main" align="right"><?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked); ?></td>
<?php
		} else {
?>
				<td class="main" align="right" colspan="2"><?php echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], $quotes[$i]['tax'])) . tep_draw_hidden_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id']); ?></td>
<?php
		}
?>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
		$radio_buttons++;
	  }
	}
?>
			</table></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php
  }
}
?>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
 }
?>
<?php
// echo $order_total_modules->credit_selection();//rmh M-S_ccgv
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr><tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td><?php echo tep_draw_textarea_field('comments', 'soft', '60', '5'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
		  <tr>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main"><b><?php echo TITLE_CONTINUE_CHECKOUT_PROCEDURE . '</b><br>' . TEXT_CONTINUE_CHECKOUT_PROCEDURE; ?></td>
			<td class="main" align="right"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
		</table></td>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
			<td><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		  </tr>
		</table></td>
		<td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
		<td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
		  <tr>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td>
			<td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td>
		<td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
		<td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
	  </tr>
	</table></td>
  </tr>
</table></form></td>
<!-- body_text_eof //-->

<td width="<?php// echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php //echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php// require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Share this post


Link to post
Share on other sites

Thanks for posting your shipping file. It works fine now. I have no idea what it was, but i don't care now other things to sort out.

Thanks a lot.

Great contribution.

 

Julian


A little knowledge is dangerous, I SHOULD KNOW.

If Life Begins At 40, What ends????

Share this post


Link to post
Share on other sites

Hi Frank

I absolutely love your contribution! I thought the original check out process from OSC was quite clunky and ... slow.

 

It seems like the contibution is working fine on my test site. My wish list is this. When a new customer fills out their address on the first checkout page, can the address be automatically copied on to the shipping address by default? And give them an option to change, if different?

 

I'm definitely not a programmer and have no clue how easy or difficult this would be. But it would be a great function for the customers who have the same billing and shipping address. This way, they don't have to type in the same address twice.

 

Thanks again for your great contribution!

 

p.s. I think the same message got posted in the wrong area. Sorry.

Edited by fromSharon

Share this post


Link to post
Share on other sites

Hi Frank, there seems to be a problem in the admin/orders.php when testing i get this error

 

---------------------------------------------

Order Number : 298

 

order Date Saturday 08 October, 2005

 

EMAIL_TEXT_INVOICE_PASSWORD https://www.scientificsales.co.nz/catalog/a...0b3e0fbc2d0cb06

 

EMAIL_TEXT_INVOICE_PASSWORD_NOLINKtxWDvPcBNcbShCb

 

Products

 

- 1 x La Crosse WT553 Projection & Temperature Clock (WT553) = $106.62

 

------------------------------------------------------

 

Thanks Craig

 

PS: Great app and have good feed back from customers.!!!

Share this post


Link to post
Share on other sites

sharon look in the post 306 afew post above and replace everything in your checkout_shipping.php above this line

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

with coresponding part of the code i posted and let me know if it works

greg

it seems to me that you missed step 15 of the instructions

you should do the fix that i asked sharon to do also

Edited by nana

Share this post


Link to post
Share on other sites

i just uploaded version 2.0

fixed some bugs

improved install file

please post if any problem

thanks

Share this post


Link to post
Share on other sites

working on making the checkout_shipping.php and create_account.php

module this way store owner can choose what boxes to show and where

if any body can think of something they would like to see please post here

i think the install is better now also yes?

Share this post


Link to post
Share on other sites

First, great contribution. Thank you. The instructions are much clearer, however...

 

The SQL commands have a small error:

 

ALTER TABLE `customers` ADD `createaccount` CHAR( 1 ) DEFAULT 'Y' NOT NULL ;

ALTER TABLE `customers` ADD `confirmation_key `VARCHAR(40) DEFAULT 'tempemptyconfirm' NOT NULL;

 

The second line should be:

ALTER TABLE `customers` ADD `confirmation_key` VARCHAR(40) DEFAULT 'tempemptyconfirm' NOT NULL;

(the space after confirmation_key returns an error in MySQL) It's a small detail, easily overlooked.

 

Thanks again!

Share this post


Link to post
Share on other sites

Is there a way to NOT use the first part of the instructions for this contrib and still have it work? In other words, can I make only the changes in the second part? I do not want to combine the shipping and payment pages.

 

To ask customers for their payment information before they are given a total of what they are being charged is not a good idea (in my opinion). I realize that they have the opportunity to change information before the order is processed, but I would be skeptical/untrusting if I were the customer in this situation. I would like to display the TOTAL of the order when the customer is asked for their credit card number.

 

peter

Share this post


Link to post
Share on other sites

I agree that it is not a good idea to card card info on this page. I think it should just be about choosing the method of payment as it is when you are using an external card processor.

Share this post


Link to post
Share on other sites

nassoit yes you can use either part independently

on the issue of entering cc# the cc fields are generated by payment modules so they can not be seprated from payment choices

i am making this page with module boxes and i have added a total box like in checkout_success.php

this way shop owner can change the order of the boxes.

like

first address then shipping then total then payment so this way the customer is aware and has chosen his shipping option before he enters his cc#

what i can not do as of now is i can not update the shipping price based on shipping choice in the same page

sample with total box

but atleast they know all charges before entering their cc#

i will upload what i have in a couple of hours it is very easy to update to the module checkout_shipping.php so if you guys want to try it and let me know

also if anyone can write the javascript to change the shipping price you are welcome to try and upload the fix

Share this post


Link to post
Share on other sites

i just added the patch files there is no editing to any existing file but replaces the checkout_shipping.php so make a backup first

let me know what you think please

i have to figure out how to add the shipping charges now short of refreshing the page.

just upload the files in your catalog directory

you can change the order in checkout_shipping.php around line 343

Edited by nana

Share this post


Link to post
Share on other sites
working on making the checkout_shipping.php and create_account.php

module this way store owner can choose what boxes to show and where

if any body can think of something they would like to see please post here

i think the install is better now also yes?

Ok, since you're asking... a few of us would really benefit from an extra question option at checkout. I know this sounds counter-intuitive to a faster checkout, but I need to ask a question and have rigged my shipping module to make it work (but it aint elegant).

All I would need is a dropdown menu that I can populate myself. I can do this from in the php or by direct query in phpmyadmin, but admin control of it would be great. I had a third party cart years ago that allowed up to three extra questions at checkout. Admin could make them radio buttons, a dropdown or a text box. They could be optional or required Changes were easy. It was very helpful.

The How Did You Hear About Us Contribution would work for this except it ties to the customer, not the order. That would be a good place to start for the code. In fact, if you're bypassing Create Account, anyone who wants to use your excellent Contrib wouldn't be able to collect that info. If you wrapped that Contrib into your checkout, it would benefir more than those few of us.

Thanks for the excellent work!


-Dan

Always, always back up your files before you make any changes!

Share this post


Link to post
Share on other sites

Hello Frank!

 

First of all, your contribution is really cool, it is exactly what I was looking for. Thanks!

 

However, I had to face a problem, and I do not know what to do because I am not a PHP specialist.

 

As soon as I disable the option to create an account or login, and one can only purchase without account, the payment/delivery address and payment/shipping method is on two different pages. If accounts are enabled, all is on one page. How can I get it, that it is always on one page?

 

Before I had found your contribution, I had installed PWA. I tried to unistall it and restore all original files, but I do not know, how to undo the sql modifications I had to run for PWA contribution. Or can I just leave them where they are?

 

Those are the lines I had to enter for PWA:

 

ALTER TABLE customers ADD purchased_without_account TINYINT(1) UNSIGNED DEFAULT '0' NOT NULL AFTER customers_id;
ALTER TABLE customers ADD INDEX (purchased_without_account);
INSERT INTO configuration_group VALUES (40, 'Accounts', 'Configuration of Account settings', 40, 1);
INSERT INTO configuration VALUES ('', 'Purchase Without Account', 'PWA_ON','true','Allow Customers to purchase without an account', 40, 1, '2003-04-08 13:07:44', '2003-04-08 12:10:51', NULL, 'tep_cfg_select_option(array(\'true\', \'false\'),');
ALTER TABLE orders ADD purchased_without_account TINYINT (1) UNSIGNED DEFAULT '0' NOT NULL;

 

I would be very thankful for help!

 

Bye, HW

Share this post


Link to post
Share on other sites
I agree that it is not a good idea to card card info on this page. I think it should just be about choosing the method of payment as it is when you are using an external card processor.

 

This is not what I meant. I am only talking about separating the shipping method selection from the payment selection. Using ONLY the second part of FastEasyCheckout is what I was looking for. And it works.

 

Thanks nana!

Share this post


Link to post
Share on other sites

daren i do not have first hand knowledge of cre loaded but unless they have done changes in create_account.php and checkout process it should work

the code is prety much is the same as the osc code

 

dan i will take a look at this sometimes this week it should not be that difficult to move the field to the order table

on the other hand to do everything else would require some thinking

 

harrywotton can you provide a link so i can see what you are talking about

also if you would let me know which version of pwa you are using and post your copy of includes/filenames.php

 

nassoit i understood what you were saying. in the original checkout you choose the shipping method first. i do not think it gives you an actuall total before you enter your cc info

my patch that i uploaded would allow you to move the payment box all the way at the bottom of the page after customer has chosen the shipping method if that is what you were looking for.

Edited by nana

Share this post


Link to post
Share on other sites

I am using this irst part of this contrib and have run in to a little problem. I have my shop set to send me a copy of the buyer's order as well as my notice of an order but since installing this contrib the only e-mail I received was the notice of payment from PayPal. I'm still learning PHP so a little help as to where I might find this problem would be great. Also, are any changes needed for this contrib to work with the PayPal IPN module?

 

Thanks

Chuck

Share this post


Link to post
Share on other sites

charles which paypalipn?

what about when you use another payment form

maybe you can test with cod and let me know if you get the email

dan if you have a dev store try to install all the parts of that contribution

with the exception of create_account.php and login.php

to start.

i used version 1.3 from hobzilla since i trust his work

Share this post


Link to post
Share on other sites

Frank,

 

Thank you, I had figured as much. Then the only place that this should differ (could be wrong) is that creloaded uses Basic Template Structure 1.3. So if I can make it work with that contrib then I am good.

 

Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×