How to Force Only One Product Per Order in Magento 2

A Magento 2 store owner may want to limit the number of items to be purchased per order due to limited stock or some selling strategy. This may even be the case when production conditions come to picture. It might not be feasible for the store owner to deliver a number of items at a time for a single order due to higher production cost.

Moreover, according to a marketing strategy, it is good to reach to more people rather than selling products in large quantity to a smaller crowd. When there is a limited stock, admin decides to sell one product per order to market it among more potential customers.

The condition to Force Only One Product Per Order in Magento 2 has to be configured programmatically as the default Magento 2 does not provide this option.

I’ll give the steps to implement the condition to Force Only One Product Per Order in Magento 2.

Steps to Force Only One Product Per Order in Magento 2:

Step 1: Create event.xml file at etc directory

Step 2: Create Cartadd.php file at Observer directory.

That’s all you need to do to Force Only One Product Per Order in Magento 2!

Any doubts on the topic are welcome in the Comments section.
Rate the post with 5 stars if you liked it.

Happy Coding 🙂

Default image
Sagar Doshi
CEO / Managing Partner

An expert in his field, Sagar Doshi is the CEO and team leader in

meghrajtechnosoft.

His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover."

Articles: 26

Leave a Reply