Magento – Magento 2 get the minimum order quantity on single product page

magento2orders

I am trying to get minimum order quantity in single product page. If someone want to purchase the product and put the quantity of the product which he/she want to buy.

But if the quantity is less than the minimum order quantity then there will generate a warning, in which the minimum amount of quantity is mentioned. For single product page i am using view.phtml file which is a custom created file and i want to get minimum order quantity of particular product in this file.

Please help me.

Thanks

Best Answer

Go to Store > Configuration > Catalog > Inventory > Product Stock Option enter image description here

in that set Minimum Qty Allowed in Shopping Cart it will automatically display minimum quantity on your product page.

enter image description here

You can also set minimum quantity for a particular product. go to Product > Edit Product > Advanced Setting >Advanced Inventory

enter image description here

Related Topic