Jump to content

Order in "Out of Stock" status if is the last product


Recommended Posts

I think I have a but on my prestashop 1.7 (last version), I have some products with quantity equals to 1, when someone buy the last product the the order status go to "in preparation" then changes to "out of stock" and an email is sent (I can cancel that email).

The problem is that I have that item in stock, is the last one but I have it, this information is misleading my customers. 

Anyone have a solution to this problem? How can I prevent the order status to go to out of stock if is the last item in stock?

 

Share this post


Link to post
Share on other sites
5 minutes ago, hubert said:

Exactly, i have the same problem on prestashop 1.7.3.3,. I'm looking for a solution, if i will find i let u know asap.

Thank you this is really a strange bug, probably more people are getting the same error.

Share this post


Link to post
Share on other sites
2 hours ago, hubert said:

For now i restored my prestashop to 1.7.2.5 and works fine, but it isn't a solution.

This is not a good solution for me I need version 1.7.3.2 at least because of my theme.

Share this post


Link to post
Share on other sites

@St3rMiN4ToR  thank you again, thanks your link i found pull request with fix.

@kandalf let's try to modify classess/PaymentModule.php (741 line) and change condition from (.... <= 0) to ( ... <0) like here:

https://github.com/PrestaShop/PrestaShop/pull/8985/commits/942747cc066aca2d93532b487ba7d210bbf4be13

screen for sure:

Screenshot at maj 27 18-06-57.png

Edited by hubert (see edit history)

Share this post


Link to post
Share on other sites

I will apply this fix until the version 1.7.4 is released, I only don't understand is how this works on previous versions since "if" was not changed in the last version. 

Share this post


Link to post
Share on other sites
  • 1 year later...
  • 7 months later...
On 4/15/2020 at 6:52 PM, Virous.2016 said:

i still have this problem in prestashop 1.7.6.4
i checked that class and it was same as that screenshot
but i still get some order with -1 qty or more

Could you please let me know if you got the solution

Thanks   acnl hair color guide

Edited by raymondred (see edit history)

Share this post


Link to post
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...

Important Information

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