grin_and_tonic Posted December 7, 2007 Posted December 7, 2007 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>';
Guest Posted December 8, 2007 Posted December 8, 2007 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')); }
grin_and_tonic Posted December 8, 2007 Author Posted December 8, 2007 THANKS SO MUCH! It worked beautifully. I appreciate the help, as I am a web programming noob, and am just starting to make sense of things.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.