Jump to content

Disable to order product when low-stock level is more than 0

Martin L uniag

Recommended Posts


I would like to ask a question, if it is possible to set up the availability/disabilty to order a product when it's stock level is more than 0.

The reason is that sometimes we have 50 customers ordering the same product at the same time. We only allow bank wire payments and before they agree to terms and conditions and click the order button, the product is sold out. We have the low-stock level set to 5, but Prestashop only sends a general notification (not even related to a specific product) that something in stock is only 5 pcs. We would like to have it set up in a way, that when the stock-level reaches 5 - it will disable ordering this product.

I hope I wrote it clearly and is it possible to set it up this way without having to buy some kind of a module? Thank you in advance for assistance.


Link to comment
Share on other sites

So the answer is that it is not possible to set it up without buying another module?

We do not have the best experience with various modules from developers around the globe, after updates and upgrades on the servers and even the Prestashop system, they don't work and have to be re-set by the developers.

Edited by Martin L uniag (see edit history)
Link to comment
Share on other sites

ok, I found this piece of code (lines 64 - 67) in the StockManager.php in the Prestashop core:

        if ($product->pack_stock_type == Pack::STOCK_TYPE_PRODUCTS_ONLY
            || $product->pack_stock_type == Pack::STOCK_TYPE_PACK_BOTH
            || ($product->pack_stock_type == Pack::STOCK_TYPE_DEFAULT
                && $configuration->get('PS_PACK_STOCK_TYPE') > 0)

Now, we are a University Publishing and since it is the beginning of the winter term, our eshop is running at max speed. So before I do any damage to the live system, I just would like to ask, that:

if I alter the "> 0" to "> 3" in the last line of code pasted above, will we get the result we are looking for (that the system will consider the product is out of stock at level 3)?

Link to comment
Share on other sites

  • 2 years later...


I currently have the same issue.

I have a lot of products with low stock and I have to refund my customers because they have been sold meanwhile.

Is there a way to automatically disallow the order of low stock level products without disabling them ? I want them to still be visible on the website and to be automatically saleable when stock is > 3 for example.

I don't think the plugin mentioned above disallow/allow the order of the products automatically. I can't test it, the demo is not working.


Does anyone has a solution or knows a plugin who does that ?


Thank you very much !

have a nice day ;)

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