Guest Posted July 31, 2003 Posted July 31, 2003 Hello, I'm trying to skip the checkout_shipping.php when I start the checkout process. But somehow it seems that when I try to access checkout_payment.php first, or I get back to checkout_shipping.php, or with some modifications, I can't login to my account anymore, like if a shipping method should be confirmed. What would be the best way to access checkout_payment without needing to use checkout_shipping.
Guest Posted July 31, 2003 Posted July 31, 2003 What i've come to is that I needed to ad the following code in checkout_payment if (!tep_session_is_registered('cartID')) tep_session_register('cartID'); $cartID = $cart->cartID; but what's happening now is on checkout confirmation I'm redirected to checkout payment, I think it's because it's checking to see what my cart contents are and it's not seeing them. What would be the next step to follow
Guest Posted July 31, 2003 Posted July 31, 2003 It works! Just had to add the following code from checkout shipping into checkout payment. // 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'); } } The way I worked it around might sound unprofessional but as long as it does the job why not. I would still appreciate a better advice to improve, as I'm learning php beause of osCommerce
Recommended Posts
Archived
This topic is now archived and is closed to further replies.