Dev.to WebDev 🛠 Dev 👁 0 📖 5 min read

Your Code Works on Your Laptop. It Fails on Your Customer's Phone.

The scene Your Black Friday sale goes live. Traffic arrives, carts fill — and then the messages start: "Your code doesn't work." You open your store on your laptop, type the code, and watch the discount apply perfectly

The scene

Your Black Friday sale goes live. Traffic arrives, carts fill — and then the messages start: "Your code doesn't work." You open your store on your laptop, type the code, and watch the discount apply perfectly. You reply that it seems fine. The customer, standing at checkout on their phone with a full cart, closes the tab and buys somewhere else.

This is not a hypothetical. Agencies that fix Shopify checkouts for a living describe "customers say our Black Friday code doesn't work" as the most common Black Friday checkout issue they are called in for — and the pattern where it works on the owner's laptop but fails for phone shoppers is one of its standard symptoms. MakesYouLocal's study of roughly 200,000 support conversations found that during Black Friday week, messages about discount codes not working roughly doubled.

The code is rarely "broken" in one simple way. It fails at the seams: between the ad and the store, between discounts that were never set to combine, and between conditions somebody set in October and forgot.

The six causes that explain almost every failure

1. The discount link does not survive the journey. Many stores put a shareable discount link in their ads so the code applies automatically. That works on a direct trip to the store. It often breaks when the ad first lands on a separate landing page or funnel, when the link passes through redirects, or when a phone browser limits cookies between domains. The shopper arrives at checkout with no discount applied and no code to type — the ad promised a price they never see.

2. The code is not active — yet, or anymore. Sale codes have start and end dates, often set in a different time zone than the sale announcement. A code shared in an early email can be tried before it starts; a code from last year's post gets tried after it ends.

3. Discounts that cannot combine. If your Black Friday code is not allowed to combine with free shipping, an automatic discount, or a bundle offer, the store applies only one. The shopper sees the free shipping or the bundle saving "disappear" when they add the code, and concludes the code broke something. On Shopify, discounts do not combine by default — each discount's Combinations setting must allow the other's class, on both sides.

4. Conditions nobody remembers setting. A minimum order value. A list of eligible products or collections. A "first order only" rule. A usage limit typed as 100 instead of unlimited, exhausted by noon. Each one produces a checkout message that sounds, to the customer, exactly like "the code doesn't work."

5. Markets and currencies. A code created for your home market may not apply in the other countries your ads reach. The shopper did everything right; the code was never valid where they live.

6. The funnel price and the code fight. If a landing page already shows a discounted price and the code then tries to discount it again — or is blocked from doing so — the checkout total does not match the page the customer came from. Mismatched totals read as dishonesty, not as a settings issue.

The 15-minute test that catches all six

You cannot fix what you only test the way you shop. Test the way your customers arrive:

  1. Open the exact link from your ad — not your store's homepage — on a phone, over mobile data, in a private browser window.
  2. Go all the way to checkout. Is the discount already applied? Is the total what the ad promised?
  3. Type the code manually as well. Does it work on its own, without the link?
  4. Add whatever else your sale offers — free shipping threshold, a bundle, an automatic discount. Does the code still apply, and does anything else vanish?
  5. Repeat on a second phone platform, and once from each country you advertise in, or with that market selected.
  6. Place a full test order through any funnel or upsell flow, and check the confirmation email total, not just the checkout screen.

Write down every checkout message you see. Each distinct message maps to a distinct cause — Shopify's own help pages, for example, use different wording for an inactive code, a code that does not apply to the cart's items, a reached usage limit, and a combination that is not allowed. The message is your diagnosis; do not waste it by just retrying.

Fix the sale, not just the code

Three changes prevent most of next year's messages:

Show the sale price before checkout. Put the discounted price on the product page itself, ideally as an automatic discount, so no shopper needs a code to see the promised price. Codes become a bonus for specific audiences, not the only door to the sale price.

Decide combinations on purpose. List every active discount during the sale — codes, automatic discounts, shipping offers, bundle pricing — and set, for each pair, whether they stack. Then check that the combined result never drops a product below its landed cost. A code that stacks further than you intended is the mirror-image failure: it "works" for the customer and quietly sells below cost.

Publish the rules where the question is asked. One short line near the code — what it applies to, the minimum, when it ends, in which time zone — plus a prepared chat answer for each of the common failure messages. Discount-code questions are among the most time-sensitive messages a store receives, because the asker is usually at checkout with a card in hand. A one-minute answer saves the sale; a one-hour answer is a refund of attention you never get back.

A concrete example

A store runs 20% off with code BF20, plus free shipping over $50 set as a separate shipping discount. The two were never set to combine. A customer with a $62 cart enters BF20: the product discount applies, the free shipping disappears, and the total drops by far less than 20% of what they expected — so they message support and abandon. The store owner tests BF20 alone on a $30 cart, sees it work, and finds nothing wrong. Multiply that one confusing checkout by every shopper who hit it silently, and the "broken code" has cost more than any single discount was worth — in lost orders, not in support time.

The takeaway

When a customer says your code does not work, believe them — then find which of the six seams they fell through. Test from the ad link, on a phone, with your other offers in the cart, in every market you sell to. Set combinations deliberately, show sale prices before checkout, and treat the exact checkout message as a diagnosis. The code was probably fine on your laptop the whole time. Your customers do not shop on your laptop.

More seller-problem guides: https://getdropflow.com

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.