In the magento API how can I retrieve the "Maximum Qty Allowed in Shopping Cart" for a specific product?

I know for the min qty allowed its $_product->getStockItem()->getMinSaleQty(); I tried getMaxSaleQty but that doesn't appear to be it.

  • try to print upto var_dump($_product->getStockItem()->getData()) – sivakumar Nov 14 '14 at 17:53

Turns out


was correct. I had an issue elsewhere.

| improve this answer | |
  • so issue solved? – sivakumar Nov 14 '14 at 17:54

on [ce-] getStockItem() doesn't return an object. However Mage::getModel('cataloginventory/stock_item')->loadByProduct($magentoProductModel)->getMaxSaleQty(); does work.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.