ns1025 Posted March 6, 2009 Share Posted March 6, 2009 Hi, My website redirects to an empty shopping cart after a successful order. Everything else is working as should. The order is placed and the email sent to the user. I might have overwritten something (c&p mistake?). Can someone hint me which draw_form or redirect function I need to change to have the users be redirected to the checkout_success.php page. I can provide a link to the website or code if needed. Thanks! Link to comment Share on other sites More sharing options...
ns1025 Posted March 8, 2009 Author Share Posted March 8, 2009 Nobody have an idea as to why this is happening. I did my research, but couldn't find a solution to this particular problem. Link to comment Share on other sites More sharing options...
ns1025 Posted March 8, 2009 Author Share Posted March 8, 2009 I really would appreciate the help. The customer is still redirected to an empty shopping cart after a successful order. Here is the testing website: Coolelektroniks.com Link to comment Share on other sites More sharing options...
ns1025 Posted March 14, 2009 Author Share Posted March 14, 2009 Hi All, Ok, so I still don't know how to fix the redirect from checkout_confirmation.php to point to checkout_success.php. I believe all the redirects including my mistake are in the following code? //fast easy checkout start foreach ($_SESSION as $key => $val) { //Uncomment the next line for diagnostic purposes ONLY! // print $key.' => '.$val.' - ';print_r($val);echo "<br>"; $HTTP_POST_VARS[$key] = $val; } // first two lines are for ccgv //tep_session_unregister('gv_redeem_code'); //tep_session_unregister('credit_covers'); tep_session_unregister('cc_number'); tep_session_unregister('cc_expires_month'); tep_session_unregister('cc_expires_year'); tep_session_unregister('cc_owner'); tep_session_unregister('authorizenet_cc_number'); tep_session_unregister('authorizenet_cc_expires_month'); tep_session_unregister('authorizenet_cc_expires_year'); tep_session_unregister('authorizenet_cc_owner'); //fast easy checkout end // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT)); tep_redirect(tep_href_link(FILENAME_LOGIN, '', '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)); } // avoid hack attempts during the checkout procedure by checking the internal cartID if (isset($cart->cartID) && tep_session_is_registered('cartID')) { if ($cart->cartID != $cartID) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } } // if no shipping method has been selected, redirect the customer to the shipping method selection page if (!tep_session_is_registered('shipping')) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } if (!tep_session_is_registered('payment')) tep_session_register('payment'); if (isset($HTTP_POST_VARS['payment'])) $payment = $HTTP_POST_VARS['payment']; 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']); } // load the selected payment module require(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment($payment); require(DIR_WS_CLASSES . 'order.php'); $order = new order; $payment_modules->update_status(); // 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')); } 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_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL')); } if (is_array($payment_modules->modules)) { $payment_modules->pre_confirmation_check(); } // load the selected shipping module require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping($shipping); require(DIR_WS_CLASSES . 'order_total.php'); $order_total_modules = new order_total; // Stock Check $any_out_of_stock = false; if (STOCK_CHECK == 'true') { for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) { $any_out_of_stock = true; } } // Out of Stock if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_CONFIRMATION); $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); $breadcrumb->add(NAVBAR_TITLE_2); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.