Jump to content
Latest News: (loading..)
Sign in to follow this  
nana

fast easy checkout

Recommended Posts

set the values to 0 on top of your create accout page

Frank,

Your account_password_new.php file takes the user to shopping_cart.php. How can it be changed so they're taken to account.php?

 

thx

Share this post


Link to post
Share on other sites

Installed the latest fastcheckout... perfect! vouchers work, shipping that wasn't showing the right options unles you refreshed the page works nicely now...

 

The one small problem is... I am using WorldPay, and I think there is something on the passing the info to worldpay, it shows a page error. If you hit back and go in again it works...

 

http://www.usbmemory.com/shop/

 

Can someone please please help me? :sweating:

Share this post


Link to post
Share on other sites

was this working before you changed versions?

also it seems that you have something missing in checkout_confirmation.php since when you click on get total it does not bring you back to checkout_shipping.php

i would uncomment the print line and trace it from there

 

 

Installed the latest fastcheckout... perfect! vouchers work, shipping that wasn't showing the right options unles you refreshed the page works nicely now...

 

The one small problem is... I am using WorldPay, and I think there is something on the passing the info to worldpay, it shows a page error. If you hit back and go in again it works...

 

http://www.usbmemory.com/shop/

 

Can someone please please help me? :sweating:

 

 

tom this page redirects you to diffrent pages depending where you come from

 

tom also what you really want to do is create account for everyone you really do not need to shorten the process either since you only have downloads

so if i were you i would simply use the stock osc setup

remove the two fields for password and confirmation and have the values generated randomly

one two three you are done

this contribution and also PWA are both overkill for what you want to do.

also you can generate a new password in the email and send that to the customer with their purchase.

Edited by nana

Share this post


Link to post
Share on other sites
how would I alter the code to hide the "Creat account?" and Login Box completeley?

 

Frank, you are a genius by the way

 

Frank,

Your account_password_new.php file takes the user to shopping_cart.php. How can it be changed so they're taken to account.php?

 

I'd liek the option to login, create or not create an account should be right at the top.

 

I have been following this thread for a while. What Frank has started and continued to support is a great contribution. Fast Easy Checkout is absolutely amazing. We should all commend Frank on his hard work and the support he continues to provide. For those who have read the entire thread, one thing is for sure: Frank has really put a lot of time and effort into developing and supporting FEC. The whole community should be thankful to Frank and to the all the other members who continue to develop osC without any costs to all of us.

 

As I mentioned, I have been following the thread for quite some time. It seems over the last few days, we have had many new osC forum members involved with the development of this thread. That is great for everyone! The whole point of osC is for us to benefit from each other. However, many requests that have been posted in this thread recently are either requests that can easily be accomplished by searching the forum or they are requests that really don't apply to the development of the contribution as a whole. I don't mean to single anyone out or discourage anyone from asking, as this is the support thread and support forum, however I felt compelled to post in the thread after seeing Frank time and time again answer many requests for help on issues that may be outside the scope of FEC. Frank seems like a great person but he may be 'too nice' to not answer.

 

For Frank's sake, before posting perhaps all of us can consider if what we are asking Frank for help on has to do with FEC or something else. For example, if you have a problem with a payment or shipping module and Frank has mentioned that FEC does not mess with any modules, then those questions may need to be asked in the threads for those modules. Another example is if one has specific requirements to change the whole logic of FEC based on the needs of one's webstore, then for very complicated issues like these that are not '1 line of code' fixes, one may need to seek professional help and let Frank deal only with bugs and developments of FEC as a whole.

 

Again, we want to encourage everyone to get involved but try to search for your answers first. There is so much on these forums and google. Let us not rely solely on Frank to solve all of our problems.

 

I would also recommend that everyone who uses FEC send some contribution to osC and Frank for all the work he has put into FEC.

 

(I hope no one takes offense to what I have written. If anyone has, feel free to PM me to keep this thread on topic)

Share this post


Link to post
Share on other sites

was this working before you changed versions?

also it seems that you have something missing in checkout_confirmation.php since when you click on get total it does not bring you back to checkout_shipping.php

i would uncomment the print line and trace it from there

tom this page redirects you to diffrent pages depending where you come from

 

Frank I get those... I marked the differences in red.

 

On first attempt

 

cart => Object - shoppingcart Object ( [contents] => Array ( [143] => Array ( [qty] => 1 ) ) [total] => 70 [weight] => 100 [cartID] => [content_type] => physical [total_virtual] => 70 [weight_virtual] => 600 )

language => english - english

languages_id => 1 - 1

currency => GBP - GBP

navigation => Object - navigationhistory Object ( [path] => Array ( [0] => Array (


=> checkout_confirmation.php [mode] => NONSSL [get] => Array ( [paynow] => 5 )

sendto => 4 - 4

billto => 4 - 4

credit_covers => 1 - 1

customer_id => 4 - 4

customer_default_address_id => 4 - 4

customer_first_name => Alessandra - Alessandra

customer_country_id => 222 - 222

customer_zone_id => 0 - 0

cartID => -

action => process - process

comments => -

shipping => Array - Array ( [id] => mzmt_table1 [title] => Shipping to UK (Royal Mail Recorded (+2 days)) [cost] => 10 )

gv_redeem_code => - payment => worldpay - worldpay

preview_x => 26 - 26

preview_y => 7 - 7

 

Hitting back from the worldpay page

cart => Object - shoppingcart Object ( [contents] => Array ( [143] => Array ( [qty] => 1 ) ) [total]

=> 70 [weight] => 100 [cartID] => [content_type] => physical [total_virtual] => 70 [weight_virtual]

=> 800 )

language => english - english

languages_id => 1 - 1

currency => GBP - GBP

navigation => Object - navigationhistory Object ( [path] => Array ( [0] => Array (


=> checkout_confirmation.php [mode] => NONSSL [get]

=> Array ( [paynow] => 5 ) => Array ( ) ) ) [snapshot] => Array ( ) )

sendto => 4 - 4

billto => 4 - 4

customer_id => 4 - 4

customer_default_address_id => 4 - 4

customer_first_name => Alessandra - Alessandra

customer_country_id => 222 - 222

customer_zone_id => 0 - 0

cartID => -

action => process - process

comments => -

shipping => Array - Array ( [id] => mzmt_table1 [title] => Shipping to UK (Royal Mail Recorded (+2 days)) [cost] => 10 )

payment => worldpay - worldpay

preview_x => 26 - 26

preview_y => 7 - 7

 

the lines for for ccgv are unquoted

tep_session_unregister('gv_redeem_code');

tep_session_unregister('credit_covers');

 

If I upload the file as it is on the contribution, is jumps worldpay completely and goes straight to checkout_success.php :x I am feeling sick...

 

The version I was using before was working except for the shipping bug.

Share this post


Link to post
Share on other sites

Ok... I just rolled back to the previous version I was using, and moved only the code on the checkout_shipping.php related to the shipping things... to just under the 2 first statements

 

require('includes/application_top.php');

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

 

// 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');

}

}

 

Working beautifully. B)

Share this post


Link to post
Share on other sites

i use bts!

 

the only thing i want to do witht his contribution is to combine shipping & payment in the order process.

 

is there a complete package provided for a oscommerce installation with BTS?

 

it would be great because i wouldn't have to bother :D

Share this post


Link to post
Share on other sites
tom this page redirects you to diffrent pages depending where you come from

 

tom also what you really want to do is create account for everyone you really do not need to shorten the process either since you only have downloads

so if i were you i would simply use the stock osc setup

remove the two fields for password and confirmation and have the values generated randomly

one two three you are done

this contribution and also PWA are both overkill for what you want to do.

also you can generate a new password in the email and send that to the customer with their purchase.

Frank,

Thanks for the reply. I hear you. It may seem that FEC is overkill but I'm no PHP programmer and FEC is delivering more of what I need than you think. First, I don't want to prompt the customer to enter a password and I don't know how to have the password randomly generated by stock osc.

Second, I don't want to send the customer the stock osc "Welcome to the store" email. I only need to communicate with a customer AFTER they have ordered and getting them to that point is paramount! FEC does this. Furthermore, the email that FEC sends is perfect after I've tweaked the words. After the customer orders is the only time they should ever receive an email from me and the email's only two purposes should be to say "thanks, here's your order details" and "do this to activate your account."

 

Now, on to the issue:

When the email is sent it includes a link to account_password_new.php. This sends them to shopping_cart upon success. I need it to send them to their account control panel so they can see their order, change a password, etc. If the account_password_new file sends people to specific places based on where they've come from perhaps we could make a copy of that file and call it "activate_account.php" and the only time this is ever called and used is from the email that the customer receives and uses to activate. Then, you'll always know where they have come from and can always send them to the account page. How can this be done?

 

So, if I duplicate account_password_new.php, as above, how can I make sure it sends customer to account screen and not shopping_cart?

 

Frank, you're awesome (brilliant)!!

Share this post


Link to post
Share on other sites

Frank,

 

Trying to update from version 2.0 to 3.1

Step Two of your upgrade instructions doesn't say which file we are changing.

 

STEP TWO

right before this code around line 67

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'));

}

add

/// fec for get total

$paynow = tep_db_prepare_input($HTTP_GET_VARS['paynow']);

if ($paynow ==3) {

tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'show_total=1&error_message=' . urlencode(ERROR_TOTAL_NOW), 'SSL'));

}

 

Thanks

Karen

Share this post


Link to post
Share on other sites

karen the code is for checkout_confirmation.php

 

 

Alessandra glad you got it working but every thing should be doable with new version since very little is really changed

 

 

tom as i said this is a n overkill you should atleast only try to use the changes that you need but what you are looking for is not really this contribution but something totaly diffrent

i would suggest you look at the files that you like and try to custom code what you want or get someone to do it foe you it is really not a big deal to make the changes that you want to the stock osc much easier than trying to redo my contribution

 

 

jens i know that this can be done for BTS and should not be so hard

i started to do this a while back but got some payjobs so i stopped

Share this post


Link to post
Share on other sites

I'm getting a parse error in checkout_success.php on line 160 or161 can't remember but know it is way at the bottom and can't find a thing wrong here?

 

 

<?php
/*
 $Id: checkout_success.php,v 1.49 2003/06/09 23:03:53 hpdl Exp $
 modified for PWA v0.90

 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');

// if the customer is not logged on, redirect them to the shopping cart page
if (!tep_session_is_registered('customer_id')) {
tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));
 }else{
// if(tep_session_is_registered('createaccount')) tep_redirect(tep_href_link('account_password_new.php','thx=1'));}

 if (isset($HTTP_GET_VARS['action']) && ($HTTP_GET_VARS['action'] == 'update')) {
$notify_string = 'action=notify&';
$notify = $HTTP_POST_VARS['notify'];
if (!is_array($notify)) $notify = array($notify);
for ($i=0, $n=sizeof($notify); $i<$n; $i++) {
  $notify_string .= 'notify[]=' . $notify[$i] . '&';
}
if (strlen($notify_string) > 0) $notify_string = substr($notify_string, 0, -1);


tep_redirect(tep_href_link(FILENAME_DEFAULT, $notify_string));
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_SUCCESS);


 $breadcrumb->add(NAVBAR_TITLE_1);
 $breadcrumb->add(NAVBAR_TITLE_2);

 $global_query = tep_db_query("select global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "'");
 $global = tep_db_fetch_array($global_query);

 if ($global['global_product_notifications'] != '1') {
$orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where customers_id = '" . (int)$customer_id . "' order by date_purchased desc limit 1");
$orders = tep_db_fetch_array($orders_query);

$products_array = array();
$products_query = tep_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int)$orders['orders_id'] . "' order by products_name");
while ($products = tep_db_fetch_array($products_query)) {
  $products_array[] = array('id' => $products['products_id'],
							'text' => $products['products_name']);
}
 }

?>
<!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">
</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 //-->
<td align="center" width="95%" valign="top"><?php echo tep_draw_form('order', tep_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')); ?><table align="center" border="0" width="85%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="4" cellpadding="2">
	  <tr>
		<td valign="top" class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?><div align="center" class="pageHeading"><?php echo HEADING_TITLE; ?></div><br><?php echo TEXT_SUCCESS; ?><br><br>
<?php
//fast easy checkout start
if(!tep_session_is_registered('createaccount')){
 if ($global['global_product_notifications'] != '1') {
echo TEXT_NOTIFY_PRODUCTS . '<br><p class="productsNotifications">';

$products_displayed = array();
for ($i=0, $n=sizeof($products_array); $i<$n; $i++) {
  if (!in_array($products_array[$i]['id'], $products_displayed)) {
	echo tep_draw_checkbox_field('notify[]', $products_array[$i]['id']) . ' ' . $products_array[$i]['text'] . '<br>';
	$products_displayed[] = $products_array[$i]['id'];
  }
}

echo '</p>';
 } else {
echo TEXT_SEE_ORDERS . '<br><br>' . TEXT_CONTACT_STORE_OWNER;
 }
}
//fast easy checkout end
?>
		<h3><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td align="right" class="main"><?php echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE); ?></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%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></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_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	  <tr>
		<td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_DELIVERY; ?></td>
		<td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_PAYMENT; ?></td>
		<td align="center" width="25%" class="checkoutBarFrom"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td>
		<td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_FINISHED; ?></td>
	  </tr>
	</table></td>
  </tr>
<?php if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php'); ?>
</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'); ?>

 

Thanks, Karen

Share this post


Link to post
Share on other sites

Hello.

 

"fast easy checkout 2.0" seems to be what Im looking for.

 

my website is: www.mrcph.dk/catalog

 

But my problem is this, when I try to go through the process it says after I have confirmed the order:

 

 

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

 

Create an Account

 

 

Your order has been successfully processed! Your products will arrive at their destination within 2-5 working days.

 

Please direct any questions you have to the store owner.Thanks for shopping with us online!

Create an Account?

By creating an account at osCommerce you will be able to shop faster, be up to date on an orders status, and keep track of the orders you have previously made.

MY_PASSWORD_TITLE * Required information

 

 

Enter Password *

Password Confirmation: *

 

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

 

Since my customers never should have the choice to register as an account (Purchase Without Account) I dont want them to get to this page. In fact they should be logged out and say something like: "Thank you for buying, you want hear about product update" just like in normal checkout.

 

But I like the shorter purchase process.

Share this post


Link to post
Share on other sites

Hello,

 

this contrib looks great !!

but i got problems with my other contribs.

 

i have installed -

had tag controller

basic template system

 

now i want to install this contrib and got errors.

 

how get i "fast and easy checkout" to work with this other 2 contribs ?

 

which version of fast&easy cheykout should i install ?

 

how must i handle the CHECKOUT_SHIPPING-php

 

i think i must transform checkout_shipping in 2 files, but i get allways errors.

got anyone a ready

CHECKOUT_SHIPPING.php and CHECKOUT_SHIPPING.tpl.php

 

or a "to-do" for this problem ?

 

thanks in advance.

 

bg

Michael

Share this post


Link to post
Share on other sites
Hello.

 

"fast easy checkout 2.0" seems to be what Im looking for.

 

my website is: www.mrcph.dk/catalog

 

But my problem is this, when I try to go through the process it says after I have confirmed the order:

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

 

Create an Account

Your order has been successfully processed! Your products will arrive at their destination within 2-5 working days.

 

Please direct any questions you have to the store owner.Thanks for shopping with us online!

Create an Account?

By creating an account at osCommerce you will be able to shop faster, be up to date on an orders status, and keep track of the orders you have previously made.

MY_PASSWORD_TITLE * Required information

Enter Password *

Password Confirmation: *

 

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

 

Since my customers never should have the choice to register as an account (Purchase Without Account) I dont want them to get to this page. In fact they should be logged out and say something like: "Thank you for buying, you want hear about product update" just like in normal checkout.

 

But I like the shorter purchase process.

 

 

Problem got solved with "Fast easy checkout 3.1"

Share this post


Link to post
Share on other sites

Hello.

 

Yet another question... I do not now much about PHP.

 

I notice when you have done the purchase process and get to the point "thank you for buying etc. etc." The customer is still logged in. So if the customer buy another product it will remember the personal details (name, address etc.). I want the shop to go to a "fresh" start after every purchase so no user is logged in.

 

What I want is when the checkout_success.php is processed it also log off the customer.

 

How do I do that ?

 

Best regards

Share this post


Link to post
Share on other sites
this is crazy why don't you put

require(DIR_WS_CLASSES . 'order_total.php');

in line 30 and comment out

:

$order_total_modules->process();

in libe 775

other than this just post the file and let me take a look later tom

ok, i found some pieces of code that were duplicated (not sure how that happened)

 

at the moment i am not getting any errors.

 

 

 

here is my code.

<?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
//$order_total_modules->process();
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">
<script language="javascript"><!--
var selected;

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>
<script language="javascript"><!--
var selected;
/* Points/Rewards Module V1.50 bof*/
function clearText(thefield){
if (thefield.defaultValue==thefield.value)
thefield.value = ""
}
function validate(field) {
var valid = "0123456789.,"
var ok = "yes";
var temp;
for (var i=0; i<field.value.length; i++) {
temp = "" + field.value.substring(i, i+1);
if (valid.indexOf(temp) == "-1") ok = "no";
}
if (ok == "no") {
alert("<?php echo REDEEM_SYSTEM_JS_ERROR; ?>");
field.focus();
field.select();
}
}
var submitter = null;
function submitFunction() {
submitter = 1;
}
/* Points/Rewards Module V1.50 eof*/
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>
<?php echo $payment_modules->javascript_validation();
?>

<?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">
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<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">
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
</table></td>
<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>
</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>

  </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>
		  </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>
<!-- Points/Rewards Module V1.50 Redeemption box bof -->
<?php 

  if ((USE_REDEEM_SYSTEM == 'true') && ($customer_shopping_points = tep_get_shopping_points()) && $customer_shopping_points > 0){
 if ((get_redemption_rules($order) == true) && (get_points_rules_discounted($order) == true)){
   if ($customer_shopping_points >= POINTS_LIMIT_VALUE){
?>
		<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_REDEEM_SYSTEM; ?></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_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td class="main" width="100%" colspan="3"><?php echo TEXT_REDEEM_SYSTEM_START . number_format($customer_shopping_points,2) . TEXT_REDEEM_SYSTEM_MIDDLE . $currencies->format(tep_calc_shopping_pvalue($customer_shopping_points)) . '.'; ?></td>
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
<?php 
  if (POINTS_LIMIT_EXACT == 'true' && $customer_shopping_points >= POINTS_EXACT_VALUE){
if(tep_session_is_registered('customer_shopping_points_spending')) tep_session_unregister('customer_shopping_points_spending');
?>
		  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onClick="submitFunction()">
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main"><?php echo TEXT_REDEEM_SYSTEM_SPENDING_EXACT; ?></td>
				<td class="main" align="right"><?php echo tep_draw_checkbox_field('customer_shopping_points_spending', $customer_shopping_points_spending); ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
<?php
 } else {
?>
		  <tr onClick="submitFunction()">
			<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td class="main" ><?php echo TEXT_REDEEM_SYSTEM_SPENDING . '  ' .tep_draw_input_field('customer_shopping_points_spending', $customer_shopping_points_spending , 'onBlur="validate(this)" onFocus="clearText(this)" maxlength="7" style="width:70px"'); ?><br><?php echo TEXT_REDEEM_SYSTEM_SPENDING_ALL; ?></td>
				<td class="main" align="right"><br><?php echo tep_draw_checkbox_field('customer_shopping_points_spending', $customer_shopping_points); ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
			</table></td>
		  </tr>
<?php 
 }
?>
		</table></td>
	  </tr>
	</table></td>
  </tr>
<?php 
  }
}
 }
?>
<!-- Points/Rewards Module V1.50 Redeemption box eof -->


   <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>
<tr class="infoBoxContents" >
<td align-"right><table border="0" width="100%" cellspacing="1" cellpadding="2" align-"center" class="infoBox"><tr class="infoBoxContents"><td>
<table border="0" width="100%" cellspacing="1" cellpadding="2" align-"center" class="infoBoxcontent" >


</table></td></tr>
</table></td>
</tr>
<tr class="infoBoxContents" >
<td align-"right><table border="0" width="100%" cellspacing="1" cellpadding="2" align-"center" class="infoBox"><tr class="infoBoxContents"><td>
<table border="0" width="100%" cellspacing="1" cellpadding="2" align-"center" class="infoBoxcontent" >


<?php

//if (MODULE_ORDER_TOTAL_INSTALLED) {
//$order_total_modules->process();
//echo $order_total_modules->output();
//}

if (is_array($payment_modules->modules)) {
if ($confirmation = $payment_modules->confirmation()) {

?>
<?php
for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) {
?>
<tr class="infoBoxContents" align="right">
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main"><?php echo $confirmation['fields'][$i]['title']; ?></td>
<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main"><?php echo $confirmation['fields'][$i]['field']; ?></td>
</tr>
<?php
} } }


$html = '<input type="submit" name="action" value="Add" />';


?>

</table></td></tr>
</table></td>
</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>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Share this post


Link to post
Share on other sites
Hello.

 

Yet another question... I do not now much about PHP.

 

I notice when you have done the purchase process and get to the point "thank you for buying etc. etc." The customer is still logged in. So if the customer buy another product it will remember the personal details (name, address etc.). I want the shop to go to a "fresh" start after every purchase so no user is logged in.

 

What I want is when the checkout_success.php is processed it also log off the customer.

 

How do I do that ?

 

Best regards

i do not think osc logs the customer off or not since i have always had a modified checkout_success.php

i think there is a tip on how to do this in this tread also you can look at logoff.php and see if you can copy and paste the code or you van have it redirected to logoff.php and ass the thankyou message

 

it should not be that difficult

 

eww i really do not remmember what you are trying to do please remind me

 

michael i know that it can be used with bts and i don't think it is that hard to implement

 

karen you are probably missing a closing bracket somewhere

Share this post


Link to post
Share on other sites
eww i really do not remmember what you are trying to do please remind me

completely move all of checkout_confirmation.php's info onto checkout_shipping.php so i can remove checkout_confirmation.php from the checkout process ;)

Share this post


Link to post
Share on other sites

eww oh yes

now please go and try to checkout and use your points and rewards and other stuff that you have

when you reach checkout_confirmation.php

use browser back button to go back to checkout_shipping.php

you must have correct total showing and hopefully be able to see all the total modules

if you do then let me know

i hope you are still with paypal and check modules

Share this post


Link to post
Share on other sites
now please go and try to checkout and use your points and rewards and other stuff that you have

it works smoothly, but i do not see a total. i may have missed an edit?

do you want to see my shop and test it yourself? i prefer to pm the address to you though :)

 

i hope you are still with paypal and check modules

yep :)

Share this post


Link to post
Share on other sites

Hi there- love the contrib... but having a prob that I am becoming aware of, and loosing money on--- I've had several customers call with this prob.

 

I am using the prior version- have not upgraded (and afraid to try upgrading right now as we are in the midst of busy season!).

 

Anyway, the create account screen works fine. Once they click thru they are taken to checkout_shipping. IF they do not select the proper credit card type, or some sort of error - they are bounced to checkout_payment and asked to reenter. After they do, they are taken back to checkout_shipping and the dropdown will again default to the first selection, you click continue, take you back checkout_payment wanting you to reenter the info, then back to checkout_shipping... so on and so forth- and will not accept the right information. It seems like a big loop.

 

Is there a way to deactivate the validator that checks the card number to card type. If I can turn off this function that would be huge. If they make an error, authorize.net will not accept it, so no prob.

 

I just really hope there is a way I can force OSC to skip the whole validation route.

 

Any help would be greatly, GREATLY appreciated as I know we are loosing quite a bit of money on this.

 

Thanks!

Share this post


Link to post
Share on other sites

i have one of two suggestions for you

1- have the redirect point to checkout_shipping.php

or a quick dirty trick would be first make a copy of your checkout.payment.php

and then make a duplicate of your checkout_shipping.php and name it checkout_payment.php

this way you won;t have the loop

first solution is better

in checkout_confirmation.php

repalce

FILENAME_CHECKOUT_PAYMENT

to

FILENAME_CHECKOUT_SHIPPING

this will redirect to checkout_shipping.php and hopefully resolve the issue

Share this post


Link to post
Share on other sites
i have one of two suggestions for you

1- have the redirect point to checkout_shipping.php

or a quick dirty trick would be first make a copy of your checkout.payment.php

and then make a duplicate of your checkout_shipping.php and name it checkout_payment.php

this way you won;t have the loop

first solution is better

in checkout_confirmation.php

repalce

FILENAME_CHECKOUT_PAYMENT

to

FILENAME_CHECKOUT_SHIPPING

this will redirect to checkout_shipping.php and hopefully resolve the issue

 

Hi Frank,

 

Thanks for the quick reply... glad you were still awake, I don't really get much sleep this time of the year (for the next couple more weeks anyway).

 

Would changing those filenames in checkout_confirmation have an effect since the problem is that the user doesn't reach that page?

 

The problem with duplicating and renaming is that it still wants to go through the pages, meaning if I am on checkout_shipping (and make an error), I then go to checkout_payment (where error is fixed), and then brought back to checkout_shipping... just a little long process for correcting an error. Have you heard of this happening with anyone else? I have no clue what I did wrong to make this occur.

 

Thanks again so much for the help!

Share this post


Link to post
Share on other sites

why don't you just change this code in checkout_confirnation.php

 tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=ccerr&error=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));

to

 tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, 'payment_error=ccerr&error=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));

should be around line 100 or thereabout

this way it will redirect to checkout_shipping.php and no loop

Edited by nana

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  

×