cancel
Showing results for 
Search instead for 
Did you mean: 

Stock qty

Stock qty

Hi all,

 

I wish to change the IN STOCK display to X IN STOCK.

 

I found the phtml that handles the display

vendor/magento/module-catalog/view/frontend/templates/product/view/type/default.phtml

 

How do I create something like this:

<?php $_stock = $block->getProduct()->getQty() ?>

and then display it on the frontend. This only returns empty.