Prestashop: BO - Orders page - increment/decrement button doesn't work when we try to add a product out of stock < 0 (allow order

Created on 20 Oct 2020  路  6Comments  路  Source: PrestaShop/PrestaShop

Describe the bug

In the BO => Orders page => New Order page => when we try to add an out of stock product with allowing order, the increment/decrement button doesn't work
In this PR: https://github.com/PrestaShop/PrestaShop/pull/20714 we just fixed when the quantity of product = 0
But when the quantity product < 0 => NOK

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to BO => Catalog => Products page
  2. Add a product with quantity < 0 with allow order selected
  3. Go to BO => Orders => New Order page
  4. Add the last product created
  5. check the increment/decrement button
  6. see error => we can't increment the product quantity

Screenshots

https://drive.google.com/file/d/1WS2cfkW-_EVms0IPYD5FFunCpOnc6_Tz/view?usp=sharing
image

Additional information

  • PrestaShop version: 1770rc1build2
  • PHP version: 7.2
1.7.7.x BO Bug Fixed Minor Nice to have Order PR available Regression migration

Most helpful comment

@PululuK You can configure the products to authorize to be ordered out of stock via Product::out_of_stock

Yes I know, I misunderstood the description ... I'm sorry !

All 6 comments

Thanks for opening this issue! We will help you to keep its state consistent

Hi @khouloudbelguith
But ... you have a negative stock right ?
Thanks

@PululuK, yes!

If you have Allow orders as behavior when out of stock => We can have negative stock.
Steps to reproduce it for example:
Product quantity = 1 with Allow orders when out of stock
From the FO, a customer adds to the cart 3 products => checkout
In this case we have a product quantity = -2 < 0

Thanks!

@PululuK You can configure the products to authorize to be ordered out of stock via Product::out_of_stock

@PululuK You can configure the products to authorize to be ordered out of stock via Product::out_of_stock

Yes I know, I misunderstood the description ... I'm sorry !

Fixed by #21555

Was this page helpful?
0 / 5 - 0 ratings

Related issues

matks picture matks  路  3Comments

vincent-dp picture vincent-dp  路  3Comments

itisco picture itisco  路  3Comments

centoasa picture centoasa  路  3Comments

sandra2n picture sandra2n  路  3Comments