I'm trying to add in a single file on the root folder something than given a sku or id (it can be either get or post)
it will return me the stock as plain text.
I'm trying to figure out if there is a way to do something like.
$products=Mage::getModel('catalog/product')->getCollection();
foreach($products as $_product){
$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product);
echo $stock->getQty();
echo $stock->getMinQty();
echo $stock->getMinSaleQty();
}
but this file isn't connected to Magento
sorry for the bad english,