0

I want to show product quantity in Magento 1.9.x order items in admin panel. I'm not talking about quantity ordered, but product quantity itself. Is there a way to check product qty in sales order item in Magento admin panel? Thanks.

0

I've found the solution. Below is the code I added to name.phtml located in app/design/adminhtml/default/default/template/sales/items and it gets product stock quantity in sales order items:

 $_sku = $_item->getSku();
 $_product = Mage::getModel('catalog/product')->loadByAttribute('sku', $_sku);
 $stock_count = (int) Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty(); echo $stock_count;

Regards

| 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.