Jump to content

Prestashop 1.7 adds unwanted products to cart


wim vos

Recommended Posts

When customers go to they shopping cart to start the ordering process, Prestashop adds random articles to the cart.

Very embarrassing, as if i want to sell more than the customer orders.

Any idea where I can find this error, or where to look for?

 

Link to comment
Share on other sites

There have in the past indeed occasionally been problems of carts mixing up. So if you can check this and be certain about it you would have a starting point.

However, I don't remember the details, you will need to do some searching yourself. I suggest you search the forum for old posts. I suggest also that you put a new question in this forum with a more specific subject that mentions the carts so that people who know about it will notice it.

Link to comment
Share on other sites

Most of the sites with carts use cookies to track what u selected t obuy. Because you are working from one computer it will presume you are making up your mind to buy a 1000 products :D  

 

But if it is adding procucts you didnt add to cart previously then it is an issue.

Or is t just suggesting like customers who purchased this also saw these....

Link to comment
Share on other sites

This is the Step by step error:

 

If the shopping cart is empty, logging in as customer  goes well.

 

If one or more products are in the shopping cart and I log in, I will consistently get a 502 bad gateway nginx error.

Products remain in the shopping cart (if I go back to the previous page in the browser) But am unable to go to check-out

 

If there are no products in shopping cart and no stored cookies and I log in, sometimes one or two random products sometimes 2 with a low ID number are automatically added to my shopping cart. (gggggrrrrrr....)

 

When I log in and place products in my shopping cart (or leave the automatic ones in), things are going well.

If I then log out; shopping cart turns empty (that is alright)

When I then try and log in again I get the 502 bad gateway error again.

 

After that, an admin must throw away my shopping cart out in the BO, or I can no longer log in as a customer (without the 502 error).

 

Server error:

2018-02-05 12:46:35       Error      <my IP>               404         GET /favicon.ico HTTP/1.0                https://www.domainname.com/nl/bestelling Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36 OPR/50.0.2762.67        50.9 K    Apache-toegang

2018-02-05 12:46:35       Error      <my ip>             82216#0: *44767 upstream sent too big header while reading response header from upstream     nginx-foutmelding

Anybody?

 

Link to comment
Share on other sites

  • 10 months later...

Hi,

It turned out to be two separate problems 1: the 502 bad gateway nginx error error. This is caused by to strict security in the server. I communicated intensively with the host (Alphamegahosting) They tried to help but in the end they where not prepared to change their server settings. I had to change host and that solver that problem fully!

and problem 2: sometimes one or two random products sometimes 2 with a low ID number are automatically added to my shopping cart. 

Prestashop 1.7 adds unwanted random product(s) to new order and  consequent 502 bad gateway error was caused by an inconsistency between ps_cart_products and ps_cart tables in the database. 

This inconsistency was introduced after import customers. Carts that turned into orders are still coupled to the customer. Error: Cart cannot be loaded or an order has already been placed using this cart.

 Cause: inconsistency between ps_cart_products table and ps_cart table

Solution: Make a note of highest number in id_cart in ps_cart_products database table

In ps_cart set AUTO_INCREMENT value to highest number in id_cart in ps_cart_products  + 1

 Disclaimer: Ofcourse before making any changes to your webshop make a full backup, I am not responsible for any results of applying my writing. It solved my problem but there is no guaranty it solves anything for you.

Hope this helps, I was given the help from someone too.

good luck!

 

  • Like 1
Link to comment
Share on other sites

  • 1 year later...
On 12/12/2018 at 3:00 PM, wim vos said:

Hi,

It turned out to be two separate problems 1: the 502 bad gateway nginx error error. This is caused by to strict security in the server. I communicated intensively with the host (Alphamegahosting) They tried to help but in the end they where not prepared to change their server settings. I had to change host and that solver that problem fully!

and problem 2: sometimes one or two random products sometimes 2 with a low ID number are automatically added to my shopping cart. 

Prestashop 1.7 adds unwanted random product(s) to new order and  consequent 502 bad gateway error was caused by an inconsistency between ps_cart_products and ps_cart tables in the database. 

This inconsistency was introduced after import customers. Carts that turned into orders are still coupled to the customer. Error: Cart cannot be loaded or an order has already been placed using this cart.

 Cause: inconsistency between ps_cart_products table and ps_cart table

Solution: Make a note of highest number in id_cart in ps_cart_products database table

In ps_cart set AUTO_INCREMENT value to highest number in id_cart in ps_cart_products  + 1

 Disclaimer: Ofcourse before making any changes to your webshop make a full backup, I am not responsible for any results of applying my writing. It solved my problem but there is no guaranty it solves anything for you.

Hope this helps, I was given the help from someone too.

good luck!

 

 

Yours solution did the job for me. Problem with weird products behavior in cart is gone. Thanks a lot!

My current PS version: 1.7.6.7

Edited by Jan Utko (see edit history)
Link to comment
Share on other sites

  • 3 years later...
On 12/12/2018 at 4:00 PM, wim vos said:

Hi,

It turned out to be two separate problems 1: the 502 bad gateway nginx error error. This is caused by to strict security in the server. I communicated intensively with the host (Alphamegahosting) They tried to help but in the end they where not prepared to change their server settings. I had to change host and that solver that problem fully!

and problem 2: sometimes one or two random products sometimes 2 with a low ID number are automatically added to my shopping cart. 

Prestashop 1.7 adds unwanted random product(s) to new order and  consequent 502 bad gateway error was caused by an inconsistency between ps_cart_products and ps_cart tables in the database. 

This inconsistency was introduced after import customers. Carts that turned into orders are still coupled to the customer. Error: Cart cannot be loaded or an order has already been placed using this cart.

 Cause: inconsistency between ps_cart_products table and ps_cart table

Solution: Make a note of highest number in id_cart in ps_cart_products database table

In ps_cart set AUTO_INCREMENT value to highest number in id_cart in ps_cart_products  + 1

 Disclaimer: Ofcourse before making any changes to your webshop make a full backup, I am not responsible for any results of applying my writing. It solved my problem but there is no guaranty it solves anything for you.

Hope this helps, I was given the help from someone too.

good luck!

 

I'm coming just to say many thanks, Wim! I really got desperate with this issue which may happened with me because I deleted all the records from ps_cart table due to performance issues. Thank you so much!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...