Jump to content

bug: multistore shared stock shopping-cart summary update quantity


Richard S

Recommended Posts

Hello,

I've come up with a strange bug. I have multistore shops group with shared stock, carts and customers.

I add product in one shop A and try to checkout on second one B. Product is created and assigned only to shop A.

 

The problem is that if I add product from shop A and try to increase quantity value at shop's B shopping-cart summary it shows that the product is out of stock and no longer available.

This is a bug, because CartController.php initiates product object in processChangeProductInCart() function without id_shop and ObjectModel creates product width context's shop which is not the right one and product does not exist in the current context shop, but it exists in another shop and the stock is good. 

 

GitHub link to CartController:

https://github.com/PrestaShop/PrestaShop/blob/1.6/controllers/front/CartController.php#L207

 

This problem is only seen if product is not assigned to both shops.

Link to comment
Share on other sites

  • 1 year later...

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