Magento Open Source 2.3.x

This is the 2.3 Beta release version of Magento documentation. Content in this version is subject to change. For additional versions, see Magento Documentation and Resources.

Buy X Get Y Free

This example shows how to set up a cart price rule for a “Buy X, Get Y Free” promotion. The format of the discount is as follows:

  • Buy X quantity of product, get Y quantity for free.

Examples

Buy X Get Y Free is processed as a single action, with a “row total” dependency. All items must be from the same SKUStock Keeping Unit: A number or code assigned to a product to identify the product, options, price, and manufacturer. to qualify for the promotion. For example:

To limit the free product to categories A, B, and C, set the action as follows:

  • If ALL of these conditions are TRUE:
    Category is one of A, B, C

To limit the free items from any category A, B, C and receive Y from SKUs D123, E123, F123, set the action as follows:

  • If ALL of these conditions are TRUE:
    SKU is one of D123, E123, F123

Use the following formula to determine the correct value for the Maximum Qty Discount:

  • Formula = (X+Y) * (M/Y)
    Where
    X = number of items purchased
    Y = number of free items
    M = Maximum number of free items allowed

For example:

  • Buy 5 Get 2 Free with maximum of 4 free items allowed.
    Where
    X = 5
    Y = 2
    M = 4
    Maximum Qty Discount = (5+2)*(4/2)=(7)*(2)=14
  • Buy 5 Get 3 Free with maximum of 9 free items allowed.
    Where
    X = 5
    Y = 3
    M = 9
    Maximum Qty Discount = (5+3)*(9/3)=24
  • Buy 20 Get 2 Free with maximum of 20 free items allowed.
    Where
    X = 20
    Y = 2
    M = 20
    Maximum Qty Discount = (20+2)*(20/2)=(22)*(10)=220