Jump to content
simon_68

[solved] Empty cart problem 1.6.0.9

Recommended Posts

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 by simon_68 (see edit history)

Share this post


Link to post
Share on other sites

Go to 'Modules' and click on the 'Cart Block' module. Select 'NO' for ajax cart.

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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 by simon_68 (see edit history)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Looks like there is no good solution for this problem, shall I report a bug?

Share this post


Link to post
Share on other sites

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.

  • Like 2

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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!

  • Like 1

Share this post


Link to post
Share on other sites

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 by Pete78 (see edit history)
  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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...

Share this post


Link to post
Share on other sites

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-10487
http://forge.prestashop.com/browse/PSCSX-5921

http://forge.prestashop.com/browse/PSCSX-4728
https://www.prestashop.com/forums/topic/392573-solved-empty-cart-problem-1609/

  • Like 2

Share this post


Link to post
Share on other sites

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

 

 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 by mhu100 (see edit history)

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More