simon_68 Posted January 6, 2015 Share Posted January 6, 2015 (edited) Hi there, I've installed new shop a month ago (lacepatterns.eu), imported about 1500 products from old VM store and everything seems fine, except cart function. Cart works just fine for some customers but for some not; when not working it is impossible to add more than one product. Even with one product, cart is empty at checkout. Occasionally it starts working after some clicks to “Add to cart” button, occasionally not. No solution known form forum seems to work and I'm a bit desperate. Is somewhere a list of possible reasons and a solution that works for sure? Since, like somebody already wrote, it does not make sense to have a store where people can’t buy. Many thanks for any suggestion! Edited January 18, 2015 by simon_68 (see edit history) Link to comment Share on other sites More sharing options...
duredo Posted January 6, 2015 Share Posted January 6, 2015 Go to 'Modules' and click on the 'Cart Block' module. Select 'NO' for ajax cart. Link to comment Share on other sites More sharing options...
El Patron Posted January 6, 2015 Share Posted January 6, 2015 I had similar problem, drove me crazy!...this solution worked for me. using phpmyadmin find the following tables, and export them (back up) ps_connections ps_connections_page ps_connections_source then using phpmyadmin 'empty the table (TRUNCATE) do this for each of these tables... Link to comment Share on other sites More sharing options...
simon_68 Posted January 6, 2015 Author Share Posted January 6, 2015 (edited) Go to 'Modules' and click on the 'Cart Block' module. Select 'NO' for ajax cart. I love ajax cart and would like to use it. If this is a known problem or bug, I'm wondering why developers haven't solved it yet. Or there are special circumstances when ajax cart works and when not? Tried today, cart doesn't work with ajax, switched ajax off, still doesn't work, switched ajax on and reloaded page (Ctrl+F5 in FO), cart starts working after some clicks to "Add to cart". www.lacepatterns.eu Edited January 9, 2015 by simon_68 (see edit history) Link to comment Share on other sites More sharing options...
simon_68 Posted January 6, 2015 Author Share Posted January 6, 2015 I had similar problem, drove me crazy!...this solution worked for me. using phpmyadmin find the following tables, and export them (back up) ps_connections ps_connections_page ps_connections_source then using phpmyadmin 'empty the table (TRUNCATE) do this for each of these tables... I've tried this several times, together with cache clear on both sides and forced compilation, but unfortunately doesn't work for me. Ok, usually cart starts working after this for particular test or customer, but after some time, another customer complains that cart doesn't work. Link to comment Share on other sites More sharing options...
simon_68 Posted January 7, 2015 Author Share Posted January 7, 2015 Looks like there is no good solution for this problem, shall I report a bug? Link to comment Share on other sites More sharing options...
simon_68 Posted January 18, 2015 Author Share Posted January 18, 2015 Finally solved the problem ... my ps_orders table was partly corrupted, especially fields id_cart, payment, conversion_rate and module. When I corrected those, cart works perfectly. 2 Link to comment Share on other sites More sharing options...
JanetsCloset Posted January 30, 2015 Share Posted January 30, 2015 How did you correct those? Link to comment Share on other sites More sharing options...
simon_68 Posted January 31, 2015 Author Share Posted January 31, 2015 Hosting panel, phpMyAdmin and some knowledge about sql Link to comment Share on other sites More sharing options...
ChrisRabkin Posted April 7, 2015 Share Posted April 7, 2015 Great! So care to post the mySql that you used to fix it? Im sure there are lots of people having this issue- i know we are and disabling ajax on the cart block doesnt do anything Thanks in advance Link to comment Share on other sites More sharing options...
simon_68 Posted April 7, 2015 Author Share Posted April 7, 2015 Chris, unfortunately I'm not clever enough to write a script which will solve all the problems with cart. What you have to do is find illegal values in the table and columns I mentioned. And which values are illegal? This information you can get by comparing the data in some working demo DB or fresh installation DB and your DB with cart problems. Let us know about success! 1 Link to comment Share on other sites More sharing options...
Pete78 Posted April 25, 2015 Share Posted April 25, 2015 (edited) Hi, I had the same problem. No "non ajax cart", cookie deleting, cache emptying etc. helped. But the hint with the ps_order table was very helpful: That's what I did: ( it was a 1.4 -> 1.6.0.14 migration project) Check your ps_order table: Look, what is the highest id of your id_cart column. Now you can look into your id_cart table: if the IDs there are lower, than you might have a problem. Easy to fix: check your autoincrement value: SELECT `AUTO_INCREMENT` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'YOURDATABASENAME' AND TABLE_NAME = 'ps_cart' add 1 or 10 AND DO ALTER TABLE ps_cart AUTO_INCREMENT = thenewvalue; No guarantee, backup first, just a chance to fix it... Cheers, Peter Edited April 25, 2015 by Pete78 (see edit history) 2 1 Link to comment Share on other sites More sharing options...
letrof Posted June 26, 2015 Share Posted June 26, 2015 I am facing the empty cart issue after upgrading from 1.4 to 1.6. I've checked both tables and indeed my id_cart values in the ps_order table are higher (around 500) than id_cart in the ps_cart table. Can you explain exactly what should I do? Because Easy to fix: check your autoincrement value: SELECT `AUTO_INCREMENT` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'YOURDATABASENAME' AND TABLE_NAME = 'ps_cart' add 1 or 10 AND DO ALTER TABLE ps_cart AUTO_INCREMENT = thenewvalue; isn't exactly clear for me. Thanks! Link to comment Share on other sites More sharing options...
Pete78 Posted June 26, 2015 Share Posted June 26, 2015 First: Rund this query in phpmyadmin: SELECT `AUTO_INCREMENT` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'YOURDATABASENAME' AND TABLE_NAME = 'ps_cart' You will get a value, Take this value and add 1 to it. (lets call the new value "thenewvalue" Second: Run this query: ALTER TABLE ps_cart AUTO_INCREMENT = thenewvalue; thats it... Link to comment Share on other sites More sharing options...
dunikowski Posted July 20, 2015 Share Posted July 20, 2015 I have just spent two days to solve it and here is what helped me: My problem was corrupted database (cart id mismatch or sth), and making one order from backoffice set everything in place. Here are similar solved issues: http://forge.prestashop.com/browse/PSCFV-10487http://forge.prestashop.com/browse/PSCSX-5921 http://forge.prestashop.com/browse/PSCSX-4728https://www.prestashop.com/forums/topic/392573-solved-empty-cart-problem-1609/ 2 Link to comment Share on other sites More sharing options...
bossdetailing Posted July 2, 2016 Share Posted July 2, 2016 First: Rund this query in phpmyadmin: SELECT `AUTO_INCREMENT` FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'YOURDATABASENAME' AND TABLE_NAME = 'ps_cart' You will get a value, Take this value and add 1 to it. (lets call the new value "thenewvalue" Second: Run this query: ALTER TABLE ps_cart AUTO_INCREMENT = thenewvalue; thats it... Hi meaby this is simple for you but can you tell me how you create "thenewvalue" im never do that. Any printscreen please this will be very helpfull Link to comment Share on other sites More sharing options...
toup Posted October 6, 2016 Share Posted October 6, 2016 Hi meaby this is simple for you but can you tell me how you create "thenewvalue" im never do that. Any printscreen please this will be very helpfull Hey, in phpmyadmin, you should look into ps_orders table, sort it by descending id_cart, write down the value of the biggest cart_id in it (which you can also get in SQL tab by doing "SELECT max(id_cart) as bigid FROM ps_order" if it's simpler for you). Then you add 10 or 100 to this number, and you got your "thenewvalue". The idea here is to make it so ps_cart never gives an ID to a new cart that already exists in ps_orders. ---- As a side note, this issue has been driving me mad, and I never thought about this reason. I applied the fix and my issues seem solved. Thank you very much for the insight, I encourage anyone having issues with an upgraded shop or a shop where you imported orders from an older shop to look into this. Link to comment Share on other sites More sharing options...
speedwayshop Posted April 26, 2017 Share Posted April 26, 2017 Hello My shopping cart don't work and i don't find a solution. this my web site: speedwayshop.it Could you Help me???? Thanks Danilo Link to comment Share on other sites More sharing options...
mhu100 Posted April 26, 2017 Share Posted April 26, 2017 (edited) Hello My shopping cart don't work and i don't find a solution. this my web site: speedwayshop.it Could you Help me???? Thanks Danilo Try turning off Geotargeting in BO Edited April 26, 2017 by mhu100 (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts