magentoQuick Task Cheat Sheet

Remarks

https://gist.github.com/arosenhagen/2397824

Many many snippets very helpful

Get product Stock Qty

load($id); // or load it by SKU // $sku = "microsoftnatural"; // $_product = Mage::getModel('catalog/product')->loadByAttribute('sku', $sku); $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product); print_r($stock->getData()); echo $stock->getQty(); echo $stock->getMinQty(); echo $stock->getMinSaleQty();