Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get the product attribute Minimum Qty Allowed in Shopping Cart

Tags:

magento

I need this in Cart model.

If you go in Checkout/Model/Cart.php there is a function updateItems I want to do something here with Minimum Qty Allowed attribute value of product.

How do I get this value here?

like image 835
Daric Avatar asked Jun 23 '11 10:06

Daric


1 Answers

Try this example, taken directly from Mage_Checkout_Model_Cart:

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

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

Thanks, Joe

like image 168
Joe Mastey Avatar answered Nov 15 '22 08:11

Joe Mastey