How to setup a Buy X Get Y Custom Discount?
Introduction
Offer customers a free or discounted item when they buy a specified quantity of another product. Example: Buy 1, Get 1 Free | Buy 2, Get 2 at 50% off. You can also limit the number of free/discounted items per order.
Examples and Use Cases
Buy X, Get Y at a Discount: For every 2 products of x, get a y product at 50% off.
Limited Set Discount: For every 2 product of X, get 3 of Y product at a 20% off up to 5 such sets.
Multiplying BOGO Offer: Buy 1 get 1 free - multiplies on every set.
Variant-Based Discount: Add two different products of the same variant and get 15% off on the second!
Steps to setup a Buy x get y custom discount
Here are the main steps to setup a Buy x get y custom discount:
Step 1: Discount conditions
Step 2: Discount setup
Step 3: Additional settings
Step 4: Review and launch
Now, let’s look at the key features of each step in detail to help implement our setup.
Step 1: Discount conditions

Discount Method
Choose whether the discount is applied automatically at checkout or requires a manual discount code.
Automatic: The discount is automatically applied to the cart once all conditions are met.
Manual Code Discount: Customers must enter a discount code at checkout for the discount to apply (after meeting the required conditions).
When to activate the discount
These are optional base rules that determine when a discount becomes active. Merchants can set conditions to control when the discount applies to selected products in the next steps.
You can add multiple activation rules and choose how they work together:
All rules should satisfy: The discount activates only if all conditions are satisfied.
Example: If Rule 1 is "Cart Subtotal ≥ $100" and Rule 2 is "Customer Tag = VIP," the discount applies only if both conditions are met.
At least one rule should satisfy: The discount applies if any one of the conditions is satisfied.
Example: If Rule 1 is "Cart Subtotal ≥ $100" and Rule 2 is "Customer Tag = VIP," the discount applies if the subtotal is $100+ OR the customer is tagged VIP.
Conditions / Rules to choose from
These are the rules they can use to setup in the Discount Conditions that activate the discounts on the next step.
Cart rules (Conditions based on the entire cart)
Total cart quantity: Activate discounts when the total number of items in the cart meets the set condition (e.g., “Buy 5 or more items to unlock 10% off”).
Cart subtotal: Activate discounts when the cart’s total value reaches a specific amount (e.g., “Spend $100 and get 20% off”).
Cart currency: Ensure discounts activate only for carts using a specific currency (useful for international stores).
Cart attributes: Activate discounts based on custom cart properties set by your store (key-value pairs). These attributes help identify special order types, like wholesale or pre-orders.
💡 Example: If you want to offer 15% off only when wholesale orders are in the cart, set:
Key: order_type Value: wholesale When a cart matches this condition, the discount activates.
Product rules (Conditions based on items in the cart)
Specific products in cart: Activate discounts only when certain products are added to the cart (e.g., “Buy a T-shirt and get 10% off”).
Products with variants in cart: Activate discounts when specific product variations are added to the cart (e.g., “Buy any size of ‘Blue Sneakers’ and get a discount”).
Collections in cart: Activate discounts when items from a particular collection are added (e.g., “Get 15% off all products when any product from ‘Winter Collection’ is in the cart”)
Products (Line) attributes: Activate discounts based on product-specific line item properties in Shopify, such as size, color, customization details, or other custom fields added to the product.
💡 Example: If your want to offer 10% off when eco-friendly products are in the cart, you can set:
Key: sustainability Value: eco-friendly This ensures that only products with this attribute receive the discount
Product tags in cart: Activate discounts when products with specific Shopify product tags are in the cart (e.g., “All items tagged ‘BFCM’ get 20% off”).
Product types in cart: Activate discounts when based on the product type assigned in Shopify (e.g., Apparel, Electronics, Accessories).
💡 Example: Offer 10% off when "Shoes" are in the cart by setting:
Product Type: Shoes This ensures the discount activates only when products from this type are in the cart.
Product has subscription: Activate discounts when products that are part of a subscription plan are in the cart (e.g., “Subscribe & save 10% on each refill order”).
Note:
For all Product Rules, you can specify whether the condition is based on quantity or price and choose to include or exclude products that meet this rule.
Setting conditions in Discount Conditions does not automatically apply discounts to these products. Instead, these conditions must be met to activate discounts on products selected in the Discount Setup step.
Customer eligibility rules (Conditions based on customer data)
Customer tags: Activate discounts only to specific customer groups based on Shopify tags (e.g., “VIP customers get an extra 5% off”).
Customer logged in: Restrict discounts to logged-in customers only (e.g., “Members get free shipping when logged in”).
Step 2: Discount setup

What to apply discount on
This section helps in assigning particular products or collections that need the discounts to be applied on.
Product rules to add discounts on (common in all 4 custom discounts under Step 2: Discount setup)
Any products in cart: Discounts apply to any product that is added to the cart.
Specific products in cart: Apply discounts on certain products (e.g., “Get 10% off on this tshirt”).
Products with variants in cart: Offer discounts on specific product variations (e.g., “Get a discount on size ‘36’ of ‘Sneakers’”).
Collections in cart: Apply discounts on particular collections (e.g., “Get 15% off all products in the ‘Winter Collection’”)
Products (Line) attributes: Activate discounts based on product-specific line item properties in Shopify, such as size, color, customization details, or other custom fields added to the product.
💡 Example: If your want to offer 10% off on eco-friendly products only, you can set:
Key: sustainability Value: eco-friendly This ensures that only products with this attribute receive the discount
Product tags in cart: Activate discounts to products with specific Shopify product tags (e.g., “All items tagged ‘BFCM’ get 20% off”).
Product types in cart: Activate discounts based on the product type assigned in Shopify (e.g., Apparel, Electronics, Accessories).
💡 Example: Offer 10% off all "Shoes" by setting:
Product Type: Shoes This ensures the discount applies only to products within that type.
Product has subscription: Offer discounts on products that are part of a subscription plan (e.g., “Subscribe & save 10% on each refill order”).
How these rules work together
When multiple rules are set, the discount applies based on the following logic:
All rules must be met: The first rule acts as the primary condition, while the others serve as additional filters.
Example: If Rule 1 specifies "Collection X" and Rule 2 specifies "Product Tags = Summer Sale", the discount applies only to products within Collection X that also have the "Summer Sale" tag.
At least one rule must be met: The discount applies to any product that matches any of the rules set.
Example: If Rule 1 is "Collection X" and Rule 2 is "Product Tags = Summer Sale", the discount applies to all products in Collection X and all products with the "Summer Sale" tag, even if they are not in Collection X.
Options
Each option in the Discount Setup step runs independently, and how they interact is controlled in the next step (Discount Application under Additional Settings).
Each option can have a different Product X and Product Y pairing, discount limits, and sorting rules.
Discounts activate only when the conditions set in Step 1: Discount Conditions are met.
Limit on Buy x get y setup
Set limits for Product X (qualifying item) and Product Y (discounted item) to ensure the correct discount logic is applied.
How many Product X are required to unlock Product Y: Define the quantity of Product X a customer must purchase before the discount applies to Product Y.
Example: "Buy 2 T-shirts (Product to get 1 Hat (Product Y) for free."
Number of Product Y to be discounted: Define how many Product Y items will receive the discount once the required Product X items are in the cart.
Example: "Buy 2 T-shirts, get 1 Hat at 50% off."
Limit how many times this Buy X Get Y discount can be used: Set a maximum usage limit to control how many times the discount can be redeemed in a single order.
Example: If Product X = 2 and Product Y = 1, and the limit is 2, the customer can only get 2 Hats discounted (even if they buy 6 T-shirts).
How much discount to apply
This is where you decide how and how much discount to apply on the products selected in the earlier section.
Percentage Off: Apply a percentage discount on the selected products when the customer meets the discount conditions. (Eg: “Get a 10% off”)
Fixed Amount Off: Apply a fixed discount in your store's base currency. If you support multiple currencies, Shopify will convert the discount accordingly. (Eg: “Get a $50 off”)
Sell at Fixed Price: Instead of applying a discount, set a specific fixed price for eligible products when discount conditions are met. (Eg: “Buy this tshirt for $50 instead of $75.”)
Discount applies to each item or not
A*pply discount to each item – Yes:** The discount applies individually to each product that qualifies.
Example: If the discount is $10 off per item and the cart has Product A and Product B, each item gets a $10 discount.
Apply discount to each item – No: The discount applies as a total across all selected products (split evenly).
Example: If the discount is $10 off in total and the cart has Product A and Product B, each item gets a $5 discount (total discount remains $10).
Set discount limits
Set limits on how many products in the cart can receive the discount.
Total discountable products: Limit how many total products in the cart can be discounted, regardless of type.
Example: If the limit is 5 and the cart has 10 shirts, only 5 shirts will receive the discount.
For same products: Limit how many of each product can receive a discount.
Example: If the limit is 5 and the cart contains 10 red shirts, 6 blue shirts, and 7 green shirts, only 5 red, 5 blue, and 5 green shirts will receive the discount.
For different products: Limit how many unique products can receive a discount.
Example: If the limit is 3 and the cart has 10 red shirts, 6 blue shirts, 7 green shirts, and 4 yellow shirts, the discount will apply to only 1 of any three (e.g., 1 red, 1 blue, and 1 yellow).
Choose how discount apply to cart items
Decide how discounts are applied to the products selected in Discount Setup.
By Product Price
Apply the discount based on the individual product price in the cart.
Least Expensive: The discount applies to the cheapest product(s) in the cart that meet the discount conditions.Example: If the cart contains a $50, $30, and $20 product, the discount applies to the $20 product first.
Most Expensive: The discount applies to the most expensive product(s) in the cart that meet the discount conditions. Example: If the cart contains a $50, $30, and $20 product, the discount applies to the $50 product first.
By Line Item Price
Apply the discount based on the total price of multiple units of the same product (line item).
Least Expensive: The discount applies to the line item with the lowest total price in the cart. Example: If a customer buys 3 shirts at $20 each ($60 total) and 10 jackets at $10 each ($100 total), the discount applies to the shirts first.
Most Expensive: The discount applies to the line item with the highest total price in the cart. Example: If a customer buys 3 shirts at $20 each ($60 total) and 10 jackets at $10 each ($100 total), the discount applies to the jackets first.
Understanding Line Item Price vs. Product Price in Shopify: If a customer buys 3 shirts at $20 each, the product price is $20, but the line item price is $60 (3 × $20).
Step 3: Additional Settings

Allow discount combination with other
Choose whether this discount can be combined with other Shopify discount types:
Order Discounts: Can stack with cart-level discounts.
Product Discounts: Can be combined with other product-specific discounts.
Shipping Discounts: Can be used alongside free shipping or shipping-based promotions.
Discount application
If multiple segments/options exist, choose how they interact when a customer qualifies for more than one.
Allow All: All qualified discounts apply individually and together if multiple conditions are met. Example: If both "Buy 2, Get 1 Free" and "Spend $100, Get 10% Off" are satisfied, both discounts apply.
Allow First: Only the first qualifying discount is applied, even if others also qualify. Example: If "Buy 2, Get 1 Free" is set as the first discount, it will apply before a "Spend $100, Get 10% Off" discount.
Allow Maximum: The highest-value discount is applied if multiple discounts qualify. Example: If "10% Off" and "Buy 1, Get 1 Free" apply, the discount offering the greater savings is used.
Schedule
Schedule a date and time for your campaign to run on your store.
Step 4: Review and launch

In this final step, you’ll see a summary of your entire discount setup before activation.
"Test on Store" lets you preview the discount on your live store to ensure it applies correctly.
Important: The discount will only work after you enable and save the setup.
Updated on: 11/02/2025
Thank you!