Guest Posted March 2, 2006 Share Posted March 2, 2006 Hi, Running V3.04 (can't upgrade as I have had to do some serious hacking of the code, and it would be too time consuming). When I have placed an order, the basket is not being emptied properly. E.g. First order: - Order 3 products and pay in the normal way - All details correct Second order: - Order 1 product, and pay. All emails and the order inventory show that products 2 and 3 from the first order are present in the basket BUT have not added to the cost - all prices/costs/taxes are correct, but the products are just appearing. If I dump a print_r() of the $basket variable when in cart.inc.php, I get products from the previous order listed in $basket["invArray"]. I assume this should be emptied when an order is finished, but in which file should this happen and where? Edit: If I go into the basket, nothing shows up. However, if I do the print_r() again, I get the list of products in the array. Clicking "Empty Basket" has no effect. Cheers, Matt Quote Link to comment Share on other sites More sharing options...
Guest Posted March 3, 2006 Share Posted March 3, 2006 Fixed! The following needed adding to /include/content/confirmed.inc.php: Replace: // empty basket & other session data $basket = $cart->unsetVar("conts"); $basket = $cart->unsetVar("delInf"); $basket = $cart->unsetVar("cart_order_id"); $basket = $cart->unsetVar("shipCost"); $basket = $cart->unsetVar("subTotal"); $basket = $cart->unsetVar("tax"); $basket = $cart->unsetVar("shipCost"); $basket = $cart->unsetVar("grandTotal"); $basket = $cart->unsetVar("customer_comments"); $basket = $cart->unsetVar("counted"); $basket = $cart->unsetVar("shipMethod"); With: // empty basket & other session data $basket = $cart->unsetVar("conts"); $basket = $cart->unsetVar("delInf"); $basket = $cart->unsetVar("cart_order_id"); $basket = $cart->unsetVar("shipCost"); $basket = $cart->unsetVar("subTotal"); $basket = $cart->unsetVar("tax"); $basket = $cart->unsetVar("shipCost"); $basket = $cart->unsetVar("grandTotal"); $basket = $cart->unsetVar("customer_comments"); $basket = $cart->unsetVar("counted"); $basket = $cart->unsetVar("shipMethod"); //New lines $basket = $cart->unsetVar("invArray"); $basket = $cart->unsetVar("shipKey"); $basket = $cart->unsetVar("gateway"); Matt Quote Link to comment Share on other sites More sharing options...
roban Posted March 3, 2006 Share Posted March 3, 2006 Thanks for the fix Quote Link to comment Share on other sites More sharing options...
Guest loren antolik Posted May 5, 2006 Share Posted May 5, 2006 thank you. thank you. thank you. this is such a stupid bug. Quote Link to comment Share on other sites More sharing options...
Guest Steve Abel Posted June 15, 2006 Share Posted June 15, 2006 I had this problem. Thank you for posting this fix. Quote Link to comment Share on other sites More sharing options...
Guest katherinedenger Posted October 24, 2006 Share Posted October 24, 2006 Just wondering what version of CubeCart this problem is related to. Does this issue have anything to do with these? http://www.cubecart.org/forums/index.php?s...ic=1127&hl= http://www.cubecart.org/forums/index.php?s...pic=293&hl= I first noticed I was having a problem because I deleted an order from my admin, and three orders disappeared. I couldn't find anything at all in the forums about this problem but I was wondering if these other issues are related? I noticed when I buy and item in the cart and then log in as the same customer and order a different product, it gets the same order number, so the original order is replaced. And, I noticed the basket isn't empty when logged out, etc. Pretty much all of the things these 3 threads discuss. I'm not really sure exactly what my problem is here, and also not sure what version other people are having problems with. Also, are these bugs? Or is cubecart supposed to work this way? Does anyone know if the newest version of cubecart has this problem? By the way, I have version 3.0.11 with several mods installed, including the latest security patch. Thanks in advance to anyone who can help! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.