voltagebr Posted May 25, 2016 Share Posted May 25, 2016 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 More sharing options...
erouvier29 Posted May 25, 2016 Share Posted May 25, 2016 (edited) What about declaring actual stock - 3 for each product? Edited May 25, 2016 by erouvier29 (see edit history) Link to comment Share on other sites More sharing options...
voltagebr Posted May 25, 2016 Author Share Posted May 25, 2016 It would be one Possibility , I would have to talk to the owner . But would not have a function contains the information he let not buy if less equal to 3 ? Link to comment Share on other sites More sharing options...
erouvier29 Posted June 2, 2016 Share Posted June 2, 2016 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now