The request: take 10% off an add-on product, but only when the customer also has one of the main products in their cart, and only one discounted add-on per main product. Think a stand that only goes on sale alongside a card, a case that’s discounted with a phone, or a refill that’s cheaper with the starter kit.
The logic below is the real discount a merchant saved from our AI Discount Generator. Their product names are replaced with placeholders.
Why native Shopify discounts struggle here
Shopify’s built-in Buy X Get Y discount handles the simplest version of this. It runs out when you need more:
- No extra conditions. You can’t also require a customer tag, a market, a minimum spend, or a cart attribute in the same discount.
- No tiers. You can’t give 10% off the add-on with one main product and 20% with three.
- No fixed price. The add-on can be a percentage or amount off, but not “$5 with any card.”
If plain Buy X Get Y covers you, use it. If you need any of the above, build it as logic.
How the logic works
- Count sets of the required product. A Buy X step looks for at least one item from the required product list. Every required item in the cart makes one complete set.
- Discount one add-on per set. For each set, one unit of the add-on product gets 10% off.
- Everything else stays full price. Extra add-ons beyond the number of sets aren’t discounted.
Build it with the AI Discount Generator
The fastest way. On the Regios Discounts home page, click Create discount and paste this prompt into the AI box, swapping in your own collection, product, and brand names:
Automatic product discount: 10% off the Phone Stand, limited to one discounted Phone Stand per phone in the cart. Phones are the products Phone A and Phone B. Only applies when at least one phone is in the cart.
We ran this exact prompt through the generator, and it builds the same logic as the JSON below. Review the steps it creates, link your own products or collections, and save.
Build it from scratch in the app
Step 1. Install Regios Discounts and open it. On the home page, click Create discount.
Step 2. Under Prefer not to use AI?, click Start from scratch.
Step 3. Choose Amount off product.
Step 4. Under How will customers get this discount?, choose Automatically. Give it a title, such as “Phone stand add-on”.
Step 5. Scroll to Discount steps and click Review discount steps. In the dialog, pick Start from scratch and click Next. You’ll see a Discount type box with a Then button.
Step 6. Click Then and choose Buy X.
Step 7. Click Add requirement. Leave the quantity at 1, set Any items from to Specific products, click Browse, and pick your main products (the phones). Each one in the cart makes one set.
Step 8. On the Buy X step, click Then and choose Apply discount. Title it, then set Discount type to Get Y.
Step 9. Under Customer gets, set Quantity to 1 and Any items from to Specific products, then Browse to the add-on product. Under At a discounted value, keep Percentage and enter 10.
Step 10. Click Done, then Save. One add-on per main product is discounted. Extra add-ons stay full price.
Or import the logic
Prefer to skip the clicking? Create the discount as in steps 1 to 4 above, then click Logic at the top of the discount form, choose Import, and use the JSON below. The JSON import guide walks through each screen. Link required-product-1 and required-product-2 to your main products and add-on-product to the item you’re discounting.
Ready-to-import discount logic
Copy the JSON below into Regios Discounts using the import flow, or download this file. Step-by-step: how to import discounts from JSON files (home screen, Logic > Import, choosing discount type, linking missing resources, and saving).
Want to describe what you need in plain language instead? Our AI Discount Generator covers prompts, iterating on results, linking products/collections when the app asks, and using or exporting the logic.
{
"id": "<root>",
"type": "ROOT",
"entryPoint": {
"id": "buy-x-required-0",
"then": {
"id": "apply-discount-add-on-0",
"type": "APPLY_DISCOUNT",
"title": "Add-on deal",
"value": {
"type": "GET_Y",
"quantity": "1",
"customerGets": {
"type": "SPECIFIC_PRODUCTS",
"asListOfIds": "add-on-product",
"selectedProducts": []
},
"atDiscountedValue": {
"type": "PERCENTAGE",
"percentage": "10"
}
}
},
"type": "BUY_X",
"otherwise": null,
"requirements": [
{
"quantity": 1,
"productEligibility": {
"type": "SPECIFIC_PRODUCTS",
"asListOfIds": "required-product-1,required-product-2",
"selectedProducts": []
}
}
],
"disableCurrencyConversion": false
}
}
Frequently asked questions
What happens if the customer adds two add-ons but only one required product?
Only one add-on is discounted. The logic gives one discounted add-on per required item in the cart, so the second add-on stays at full price until a second required item is added.
Can any of several products count as the required item?
Yes. The requirement accepts a list of products (or a collection). The original merchant listed seven different card products, and any one of them unlocked the add-on discount.
Can I make the add-on free instead of 10% off?
Yes. Change the discounted value on the add-on from 10% to 100%, or to a fixed amount off.
Does the customer need a code?
Not for this version. It was saved as an automatic discount, so it applies as soon as both products are in the cart. You can create it as a code discount instead if you prefer.