Hello, I think that in file ... \ src \ Adapter \ Presenter \ Product \ ProductLazyArray.php in line 766:
elseif ($ product ['quantity_wanted']> 0 && $ product ['quantity']> = 0)
was one Bug done. This condition always becomes true if $ product ['quantity'] = 0 because the desired amount always starts with 1. Due to this error, the message "There are not enough products in stock" always appears, regardless of whether the required quantity is not available or the item is not in stock.
I think this line must look like this:
elseif ($ product ['quantity_wanted']> 1 && $ product ['quantity']> = 0)
Hi @viktor-abc,
Could you please provide me steps to reproduce the issue in a new comment.
Thanks!
Hello, I have added 2 pictures that I think are self-explanatory.


Hi @viktor-abc,
Thanks for these clarifications.
I manage to reproduce the issue with PS1.7.5.0 & PS1.7.5.1 & PS1.7.4.4.
Would you be willing to make a pull request on GitHub with your code suggestion?
https://github.com/PrestaShop/PrestaShop/tree/develop
Thank you!
I can confirm the bug on my installation of PS1.7.5.1 and the fix works fine! Well done @viktor-abc !
Fixed in this PR: https://github.com/PrestaShop/PrestaShop/pull/12655
Hi,
@khouloudbelguith , this issue doesn't exist on develop branch. Can close it be?
Thanks
Hi @ntiepresta,
Yes, I did not manage to reproduce the issue with develop branch.
https://drive.google.com/file/d/1ldXUoTox8Ixko7foCQs_sIJ3SCN3wWX0/view
Since it is fixed in the next release PS1.7.6.0, I will close the issue.
Thanks!