Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shopping cart directly to confirmation page?


grin_and_tonic

Recommended Posts

Posted

How would I configure shopping_cart.php to go directly to the checkout_confirmation.php page, skipping the shipping and payment info pages? I modified the following line associated with the checkout button, but it only works sometimes. Other times, It brings me to the delivery options page (particularly if I recalculate the items in the cart). Any help would be appreciated. Note: I am keeping the shipping price and method fixed.

 

echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_CONFIRMATION, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>';

Posted

To skip the shipping and payment page, you can do the following which I found on another thread on this forum...

 

checkout_shipping.php:

 

just before:

 

// process the selected shipping method

 

add:

 

// bypass if only 1 shipping method available or free shipping

if ( (tep_count_shipping_modules() == 1) || ($free_shipping == true) ) {

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

if ($free_shipping) {

$quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;

$quote[0]['methods'][0]['cost'] = '0';

} else {

$quote = $shipping_modules->quote($method, $module);

}

$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_PAYMENT, '', 'SSL'));

}

 

 

checkout_payment.php:

 

just before:

 

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

 

add:

 

// skip if only 1 payment method available

if (tep_count_payment_modules() == 1) {

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

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

}

  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...