Clicks & Carts

How to create discount codes on Shopify

Codes, automatic discounts, and the combination rules that decide whether two offers stack. Plus where the native engine stops.

7 min read · Store setup ·

Discounts live under Discounts in the admin. There are two delivery mechanisms and four types, and the setting that causes the most confusion is combinations — whether two discounts stack.

Codes or automatic

Discount codes are entered by the customer at checkout. Right for campaigns, influencers, recovery emails and anything you want to attribute.

Automatic discounts apply themselves when the conditions are met, with no code. Right for site-wide sales, "spend £50 get free delivery", and anything where making customers hunt for a code costs you orders.

A common mistake: running a site-wide sale as a code. A proportion of customers won't find it, and the ones who go looking will leave your checkout to search for one — often landing on a coupon site that then takes affiliate credit for a sale you'd already made.

The four types

  • Amount off products — percentage or fixed, on specific products or collections.
  • Amount off order — percentage or fixed on the order total.
  • Buy X get Y — the mechanic behind most bundle offers, and useful with bundles.
  • Free shipping, optionally with a minimum and restricted to countries.

Conditions and limits

Per discount you can set:

  • Minimum purchase amount or quantity.
  • Customer eligibility — everyone, specific segments, or specific customers. Segments are how you do "returning customers only" or trade rates without a separate store.
  • Usage limits — total uses, and one-per-customer.
  • Active dates, with an end date. Set one. Discounts left running forever are a real and common revenue leak.

Combinations decide whether discounts stack

The setting most often misconfigured. Each discount declares which other types it can combine with — product, order, and shipping discounts are separate categories.

Practical consequences:

  • If a product discount and an order discount both say they combine, a customer can use both.
  • If neither combines, Shopify applies the better one for the customer.
  • Free shipping is its own category, so it usually should combine with a product discount — otherwise "10% off" silently cancels "free delivery over £50" and you get support emails.

Test the combinations before launching a campaign. Build a cart, apply both, and look at the total. This takes two minutes and prevents the most expensive category of discount mistake.

Where the native engine stops

Shopify's discount engine covers a lot. It stops at:

  • Tiered discounts that change with quantity across a category.
  • Customer-specific negotiated rates driven by rules rather than a fixed list.
  • "Cheapest item free" across a mixed cart.
  • Discounts conditional on data outside the cart.
  • Complex bundle pricing.

All of those are Shopify Functions — server-side discount logic deployed through an app. A function has no network access, so anything it decides from has to be in the cart or in metafields already.

Before commissioning one, check that the native engine genuinely can't express it. It does more than it used to.

Discount codes and SEO

Two practical points people miss:

  • Don't put a code in a page title or meta description. It attracts coupon-site traffic and looks like spam in results.
  • Codes leak. Anything you send to a segment ends up on a coupon site. Use one-per-customer limits and expiry dates on anything you don't want distributed.

Measuring them

Shopify reports usage and revenue per discount. The number worth watching is not usage — it's incremental revenue: would those orders have happened anyway?

A code that's used heavily by returning customers who were going to buy is a discount on revenue you already had. That's fine if it's deliberate and expensive if it isn't. Compare margin per order with and without the code before repeating a campaign.

Gift cards are not discounts

A gift card is a payment method and a liability, not a promotion — setting up gift cards covers the difference and the accounting treatment.

Popups and discounts

The classic email-capture-for-a-discount trade. It works, and it's worth doing carefully — see popups and email capture.

The two settings that cost money are combinations and no end date. Test the first before every campaign, and set the second on every discount you create.

Is this the problem you’re looking at?

Send me the link to your store and a line about what is going wrong. You get a straight answer within one business day — no pitch, no obligation.

mario@clicksandcarts.co

Or see what I do around Shopify: services, work beyond the theme, selected work.

Keep reading

← All articles