en Jump to content
  • 0
logan1ro

Adding product to cart, PS adds also some other products

Question

Hello guys,

 

Yesterday I've moved from the Bluehost to a VPS.

After I've changed the DNS and the site was up this strange error occures:

 

When I add to cart a product, the PS add that product in cart but along with other products, each time aleatory...

 

Check toscanamall.com

 

Could someone help me with this issue?

I use PS 1.4.8.2

 

Thank you.

Share this post


Link to post
Share on other sites

27 answers to this question

Recommended Posts

  • 1

1) open phpMyAdmin

2) open ps_cart_products table

3) check what is the highest number of ID there

4) open ps_cart table

5) go to ps_cart table settings page

6) change AUTO_INCREMENT value to value which is equal to highest number of ID stored in ps_cart_products table, the best: ID+1

Share this post


Link to post
Share on other sites
  • 0

Hello Benjamin and thank you for your time.

 

The only random thing is that the products added next to the desired product are sometimes 1 and up to 10.

This is happening on all products, at the 1st visit. More specific, if you don't clear your cache and delete "unwanted" products from cart, next time you add a product works great.

So, each time I clear cache and history and enter on website, the products thing it appears.

 

Could be something from the server? I've just moved to a new server.

 

Thank you.

 

PS: I've tested on every type of browser

Edited by logan1ro

Share this post


Link to post
Share on other sites
  • 0

As my client said , it was random , once a month maybe , yesterday it became almost in every new cart ,

I got it solved by deleting all rows on ps_cart_products that has no corresponding ps_cart row , I think there was some carts that were deleted but the corresponding cart_products were not deleted

Share this post


Link to post
Share on other sites
  • 0

For Selmen, I've similar problem, when add 1 product to cart random it add 2-3-4-5 other product e often if go to checkout give 'empty cart'.

 

Can you help me with db table? Tanks, Marco

Share this post


Link to post
Share on other sites
  • 0

Can it be you deleted some orders in back office? There may be some 'ghost products' still in the order detail table...

If you encounter the problem, can you check in the Back office if the randomly added products are also in the cart? If not, it may be indeed these ghost items from an old order....

 

Let us know.

 

My 2 cents,

pascal.

Share this post


Link to post
Share on other sites
  • 0

it's probably because some kind of inconsistency in database,

it's necessary to check the database,

there is no other way to find what's going on & fix

Share this post


Link to post
Share on other sites
  • 0

Josele, check directly in your database in table ps_order_detail if there are products that belong to and order that you don't have in the ps_orders list (check id_order field in ps_order_detail and see if there's any id in it that does NOT exist in your ps_orders table->id_order column

 

Did you ever deleted orders??

Pascal

Share this post


Link to post
Share on other sites
  • 0

things like that are related to ps_cart table and wrong ID of the cart, when it is wrong - cart displays products attached to this wrong ID.

 

im more than convinced i solved several problems like that :P

Share this post


Link to post
Share on other sites
  • 0
Finally fixes by Vekia. thanks 

the trouble is that over time it has happened again 

think it will be a conflict with any module 

if Vekia can tell us how it fixed, I appreciate all who have this problem

Share this post


Link to post
Share on other sites
  • 0

as i said problem was strictly connected to ps_cart table and inconsistency with ps_cart_products.

ps_cart has got wrong auto_index value so i had to increase it.

Share this post


Link to post
Share on other sites
  • 0

you're welcome and thanks for confirmation that it works

if in the future you will have similar problems - it's always worth to check highest ID in ps_cart_products and compare it with highest id in ps_cart

Share this post


Link to post
Share on other sites
  • 0

I have solved same issue on 1 .5.4.1 Prestashop before but now i am stuck:

 

prstshp_cart                 highest id_cart is 482

prstshp_cart_product   highest id_cart is 482

 

prstshp_cart AUTO_INCREMENT is 483

 

So it should be ok but i get random products appearing in cart when you add a product and also random products appearing when i try to manually place an order from back office.

 

I remember deleting an order or two (always forget not to....) so that is the problem obviously but cannot find solution now.

Edited by YanK1973

Share this post


Link to post
Share on other sites
  • 0

your problem was not related to order delete.

from what i see ps_cart autoindex field was to small  - and because of this it included products from ps_cart_products

 

what was the cause?

some cleaning stuff of ps_cart database

maybe you removed some ghost carts ? ;-)

 

anyway, case solved.

Share this post


Link to post
Share on other sites

×

Important Information

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