How to Set “Buy X, Get Y Free” Price Rule in Magento 2?

Posted by

Sale programs, such as “Buy X, Get Y Free” is familiar in every online store. Also in Magento, “Buy X, Get Y” is really common.

In the blog named “5 Steps to Add a New Cart Price Rule in Magento 2″ we have introduced a general look at a number of tools to set up discount principles to customers’ shopping carts.

This blog, in particular, will provide you more details on how to set the “Buy X, Get Y Free” in Magento. The meaning of “Buy X, Get Y Free” is: Buy X quantity of product, get Y quantity for free.

How to Set “Buy X, Get Y Free” in Magento Stores?


>>> Read Later: More useful Magento tutorials for e-commerce sites!

To set up the principle, you need to follow the 5 steps that required to add a new cart price rule and change the settings to your preferences.

Step 1: Add a new rule & Step 2: Draw the conditions


>>> Check Right Now: All You Need to Know about Magento Shopping Cart!

For these first two steps,  follow the cart price rule instructions to complete the rule information.

Step 3: Determine actions for the new rule

Example: Buy 3 Get 1 Free

>>> Have A Look Now: How to Install Magento 2 Extensions from The Marketplace?

Expand the Actions section and complete the setting as follow:

  • Click on the drop-down arrow of the Apply box, then choose the option “Buy X get Y free (discount amount is Y)”.
  • Discount Amount: This is the number that the customer will receive for free (the Y number). Set it to your fondness.
  • Maximum Qty Discount is Applied To: The highest number of items can apply the discount. For instance, if you enter 1 to this, there will be only one item being discounted.
  • Discount Qty Step (Buy X): Write down the quantity that the customer must buy to qualify for the discount. (this number is X).
  • Apply to Shipping Amount: If you set this field to “Yes”, the Discount Amount will be applied to subtotal and shipping amount separately. If you set “No”, the Discount Amount is only applied to subtotal.
  • Discard subsequent rules: Set this to “Yes” if you don’t want to merge with other discount rules. Select “No” otherwise.
  • Free Shipping: You can choose one of the three options below:


For matching items only

For shipment with matching items

  • Lastly, tap Save and Continue Edit on the upper-left corner.


>>> Don’t Miss This: How to Use The Magento WYSIWYG Editor? – A Full Guideline for E-commerce Sites!

Step 4: Set the Labels

Review Step 4 of setting a new cart price rule to set the label that appears to customers when they checkout.

Step 5: Save and Test the Rule

When complete all the settings, click Save Rule.

After that, go to your homepage to see whether the new settings have been applied properly or not. Because adding a completely new price rule might take a lot of time, doing the checking is worth the effort.


Above is a simple tutorial that can help to create a sales program of “Buy X, Get Y” in Magento 2. We hope this article is helpful to you.

If you need further information, please contact us anytime. Thanks a lot for reading!

Leave a Reply

Your email address will not be published. Required fields are marked *