I need to show Qty left message with qty of product in product detail page with below condition.
If the available stock is less than 'Notify for Quantity Below' parameter of each product.
And can we show same message in product detail page More Information tab?
I have set Only X left Threshold as 15 in Store -> Configuration->Catalog->Inventory
I need to show That Qty left message message only if it is less than this value.
How this can be checked and show.
Please anyone suggest me in this?
Best Answer
Create a block class to your custom module named Vendor_Module to below path:
and add the below content to it:
Now add the below code to top of your list.phtml
Then call the below block inside your foreach loop:
You can use the thing in your product details page.