Free gift guide

Why Shopify’s Buy X Get Y doesn’t add the free item

What you’ll need

  • The variant ID (or the admin link)

    How to get this: The variant ID
    1. Open the product, then click the variant. The ID is the number after /variants/ in the web address.
    2. You can paste the whole link instead; the tool finds the number.

    Step-by-step guide (opens in a new tab)

  • Shopify’s free GraphiQL app (with read_products, write_discounts access)

    How to get this: Shopify’s free GraphiQL app
    1. Install it once from shopify-graphiql-app.shopifycloud.com: enter your store address, tick the access listed here, click Install and approve.
    2. Then open it any time from Apps › Shopify GraphiQL App in your admin.

    Step-by-step guide (opens in a new tab)

  • A duplicate of your theme to test on

    How to get this: A duplicate of your theme to test on
    1. Online Store › Themes › … on your theme › Duplicate.
    2. Make the change on the copy, preview it, and publish only when it works.

    Step-by-step guide (opens in a new tab)

  • The theme code editor (to paste a snippet)

    How to get this: The theme code editor
    1. On the copy of your theme: … › Edit code.
    2. Hover the snippets folder, click New File…, name it as the tool says, paste and Save.

    Step-by-step guide (opens in a new tab)

Add it automatically

Check the discount first

  • Is it active, and is the gift in stock and on the Online Store?
  • Does the cart reach the minimum? Customer-buys items count at full price, and items that already have another product discount don’t count.
  • Is the gift also in the customer-buys collection? Then it counts toward its own minimum.
  • Uses per order set to 1, so only one is free.

Combinations

On plans other than Plus, items in a Buy X Get Y discount can’t get other product discounts. If a shopper’s code is worth more, Shopify may apply that instead of the gift.

More guides

Sources: Shopify Help Center: Combining discounts, GraphQL Admin API 2026-10: discounts.

Updated .