Irin Posted July 20, 2008 Posted July 20, 2008 I have a problem with my checkout process, using oscommerce 2.2 MS2 (060817). If I open a second window/tab in the middle of checkout and then go back to the first window to continue with the checkout process, in checkout_confirmation.php the shipping method and fees are missing. Here is a scenario: Log-in, add any product to your shopping cart, and then go checkout as you do it normally: shop.com/checkout_shipping.php shop.com/checkout_payment.php (don't hit Continue on checkout_payment.php) Right click on 'View Basket' and open link in a new IE tab: shop.com/shopping_cart.php From shopping_cart.php view product info: shop.com/product_info.php?pName=product Switch back to the first tab where shop.com/checkout_payment.php page is opened and click Continue button. Once referred to checkout_confirmation.php, there shipping method and fees are missing from the order information. Is there a bug in oscommerce or just in my shop? Any help will be appreciated. Thanks.
Irin Posted July 22, 2008 Author Posted July 22, 2008 Why... nobody is willing to try the scenario or it's just that nobody can duplicate the problem? Am I the only one having this problem?
arietis Posted July 23, 2008 Posted July 23, 2008 Why... nobody is willing to try the scenario or it's just that nobody can duplicate the problem? Am I the only one having this problem? hi irina, you're asking someone to take time out of their day to help you.....for free. so sometimes it will take more than a day or two before someone who is able to help you can get around to reading your request. also, it is very difficult to diagnose a problem like this without knowing a) what is the url of your store B) what, if any, modifications you've made or contributions you've added to your store that might affect the scenario you're describing. without knowing that, everyone is just shooting in the dark.
satish Posted July 23, 2008 Posted July 23, 2008 I have a problem with my checkout process, using oscommerce 2.2 MS2 (060817). If I open a second window/tab in the middle of checkout and then go back to the first window to continue with the checkout process, in checkout_confirmation.php the shipping method and fees are missing. Here is a scenario: Log-in, add any product to your shopping cart, and then go checkout as you do it normally: shop.com/checkout_shipping.php shop.com/checkout_payment.php (don't hit Continue on checkout_payment.php) Right click on 'View Basket' and open link in a new IE tab: shop.com/shopping_cart.php From shopping_cart.php view product info: shop.com/product_info.php?pName=product Switch back to the first tab where shop.com/checkout_payment.php page is opened and click Continue button. Once referred to checkout_confirmation.php, there shipping method and fees are missing from the order information. Is there a bug in oscommerce or just in my shop? Any help will be appreciated. Thanks. fresh osc RC2 is bug free atleast for the case You are talking about. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Irin Posted July 24, 2008 Author Posted July 24, 2008 All I'm asking is for somebody to try the scenario and tell if the problem above exists or not. I'm not asking to troubleshoot my shop for a problem, because I have a heavily modified shop. This is one of the reasons I'm scared to update to the RC2. All I need is to know if there is an oscommerce bug or it's something with my store's checkout process. I don't exclude that there might be something with modifications I made to my store, and that's why I need to know if it's only me having the problem or not. satish, you're saying that this problem doesn't exist in the osc RC2 version. Does it mean that there was a bug and it was fixed in this osc release or you just tried the scenario on your fresh osc RC2 and there is no problem?
satish Posted July 25, 2008 Posted July 25, 2008 well what I was to say is that this might be a bug due to code modification or register globals. So if You use rc2 this bugs will not be there as rc2 is register globals off compatible. Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Irin Posted July 25, 2008 Author Posted July 25, 2008 Well, in my case register_globals are not a problem, because it's ON. About the code modification, I'm also not sure. If I knew that it's just problem in my shop, I would definitely think about the code modification, though I'm still thinking that it's osc bug.
satish Posted July 26, 2008 Posted July 26, 2008 Well, in my case register_globals are not a problem, because it's ON. About the code modification, I'm also not sure. If I knew that it's just problem in my shop, I would definitely think about the code modification, though I'm still thinking that it's osc bug. Its not an oscommerce bug. had it been there wouldnt have been so many shops running with no problem on oscommerce cart. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Irin Posted July 26, 2008 Author Posted July 26, 2008 This problem is not such a big deal, and there is almost no way to spot it unless you play with your browser. If you checkout normally, without jumping from tab to tab, the checkout process goes smoothly, with no problems. But, sometimes there are people that like to explore and play with their browsers. So, this is how new problems pop-up from nowhere. I tried the scenario above in IE and Safari, and the problem exists in both browsers. When I'm on checkout_confirmation.php page and there is no shipping option, if I go back to the checkout_shipping.php page, no shipping option is being selected. So, my guess is that the shipping variable just not passed correctly when jumping from tab to tab. If I checkout in a normal way, without playing around with my browser, everything works perfectly. Very strange...
satish Posted July 27, 2008 Posted July 27, 2008 general reason: Shipping Module is mapped to Zones.I had seen many shop owners face this problemas instead of defining proper Zones and mapping or setting Zones to none they do something wrong. So when a customer logs in code cheks whether for customer Zone a shipping option is available if not will not show one. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Irin Posted July 28, 2008 Author Posted July 28, 2008 Hi, Satish I don't have any problems with Zones mapping. As I said, everything works fine if I go through checkout normally, without jumping from tab to tab. The shipping option is selected and carried over to the checkout_confirmation.php page. However, when I open a second window/tab in the middle of checkout and then go back to the first window to continue with the checkout process, the shipping method and fees are missing from the checkout_confirmation.php page just like the shipping wasn't selected at all. This is why I'm thinking that may be the shipping variable just not passed correctly when jumping from tab to tab. The question is what's happening and why the shipping variable is not passed correctly?
satish Posted July 28, 2008 Posted July 28, 2008 When second window was opened shipping related session variables might have been lost. So if You go back to the other window which depends on session variables on post and as session variable was changed due to You running the other page on the other tab hence the page will not execute in the way it should. This method of shopping is never going to be used so I would suggest not to worry or on chekout confirmation if no shipping is found just redirect. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Irin Posted July 28, 2008 Author Posted July 28, 2008 That might be an explanation. I also thought about the session variable. The reason I posted on the forum is because I recently had a customer checked out without selecting the shipping method and, of course, not paying for that. So, I do have a reason to worry about it, because if one person did it, somebody else will also be able to repeat it. You mentioned something about the redirection from checkout confirmation if no shipping was found. That might be a solution to the problem. Do you know how I can accomplish that? Thanks a lot for helping me.
satish Posted July 28, 2008 Posted July 28, 2008 if (!tep_session_is_registered('shipping')) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } is this line there on Your confirmation page. If it is then You need to apply logic if shipping cost has been calculated or not. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Irin Posted July 28, 2008 Author Posted July 28, 2008 I checked my checkout_confirmation.php and this line of code is there. Here is the beginning of my checkout_confirmation.php: <?php /* $Id: checkout_confirmation.php,v 1.139 2003/07/24 17:34:53 Strider Exp $ $Id: checkout_confirmation.php,v 1.139 2003/06/11 17:34:53 hpdl Exp $ $Id: checkout_confirmation.php,v 1.6.2.3 2003/05/10 20:12:14 wilt 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'); $_SESSION['FixOrder'] = ""; // 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']); } How can I modify the code to check whether or not the shipping cost was calculated or not and, if not, redirect back to checkout_shipping.php? Thanks.
Irin Posted July 29, 2008 Author Posted July 29, 2008 I modified the code in checkout_confirmation.php to the following: // if no shipping method has been selected, redirect the customer to the shipping method selection page if (!tep_session_is_registered('shipping') | $shipping == '') { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } It's amazing, but it is working. I'm just not sure this is the proper way to check if the shipping method was selected or not.
satish Posted July 29, 2008 Posted July 29, 2008 If You do not give free shipping or sell virtual products this is fine. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Irin Posted July 29, 2008 Author Posted July 29, 2008 Well, I don't offer a free shipping neither I have any virtual products.
satish Posted July 29, 2008 Posted July 29, 2008 Then the fix is fine. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.