How to get the Minimum Qty Allowed product attribute in a shopping cart

I need this in a Cart model.

If you go in Checkout/Model/Cart.php, there is a function updateItems, I want to do something here with an attribute Minimum Qty Allowedfor the product.

How do I get this value here?

+5
source share
1 answer

Try this example, taken directly from Mage_Checkout_Model_Cart:

$minimumQty = $product->getStockItem()->getMinSaleQty();

The stock system is a little dumb, I'm not surprised that it was hard to find. Hope this helps!

Thanks Joe

+12
source

All Articles