cancel
Showing results for 
Search instead for 
Did you mean: 

How to add stock quantity on the product sheet?

How to add stock quantity on the product sheet?

I need to add the quantity of stock in each product

4 REPLIES 4

Re: How to add stock quantity on the product sheet?

Hi @asistemasg3830 ,

 

Please try the below code in your phtml file to get the stock quantity of the product.

$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product);

echo $stock->getQty();
echo $stock->getMinQty();
echo $stock->getMinSaleQty();

 

Hope this helps you!

Problem Solved! Click Kudos & Accept as Solution! 

Re: How to add stock quantity on the product sheet?

Thank you !
Where is the phtml file located?

Re: How to add stock quantity on the product sheet?

Hi @asistemasg3830 ,

 

According to Vanilla Magento, your phtml file path should be like this which is rendering on the product page to show the data.

app/design/frontend/rwd/default/template/catalog/product/view.phtml

 

if you are using some third-party theme, then you need to check the same PHTML in your theme.

 

Hope this helps you!

Problem Solved! Click Kudos & Accept as Solution!

Re: How to add stock quantity on the product sheet?

  1. The Listing Settings screen displays with the Product Listing Actions section expanded by default.
  2. Click Stock/Quantity to expand the section.
  3. The Stock/Quantity settings are used to sync the product quantity details from your Magento storefront to the quantity on your Amazon Seller Central account.

I hope you got your answer.