How can I get salable quantity on list.phtml or category page file, I want to show labels on products with 0 salable quantity.
Are there any other approaches without using object manager?
How can I get salable quantity on list.phtml or category page file, I want to show labels on products with 0 salable quantity.
Are there any other approaches without using object manager?
2
Answers
Please use this code in phtml file to get salable qty
Try the below code to get salable QTY.
Either Object Manager is not a good approach, but you need to inject in your custom module such as:
Refer Link: https://magento.stackexchange.com/questions/301956/how-to-get-salable-qty-in-magento-2-3-3/302187#302187