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.

1 Answer 1

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.