Jump to content

Quantity minimum for sale


voltagebr

Recommended Posts

Hello , I wanted to know how do I block purchase orders where the stock is less than or equal to 3 .

 

Because the owner works with a margin of risk stock...

 

Let's say he has the X product that contains 8 items in stock ... when it comes to 3 items does not automatically allow more selling it , would be available only for viewing.

 

By default prestashop allows only when it reaches "0 " right ?

 

Who can help me , because I'm still half lay !

 

Grateful

Link to comment
Share on other sites

You would  have to change the quantity check methods:

  • Product::checkQty (/classes/Product.php, line 3394 in PS 1.6.1.5):
return ($qty <= StockAvailable::getQuantityAvailableByProduct($this->id, $id_product_attribute) - 3);
  • Attribute::checkAttributeQty (/classes/Attribute.php, line 209 in PS 1.6.1.5):
return ($result && $qty <= $result - 3);

 

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