ProductCustomizationStore
A headless Shopify storefront where customers design their own printed bandanas and get live, size-and-quantity-based pricing — built on Hydrogen and deployed to the edge, with Shopify kept only for cart and checkout.

01Project overview
Custom Bandanas is a direct-to-consumer storefront for printed bandanas — both ready-made designs and fully custom orders a customer configures themselves. It runs as a headless Shopify build: a Hydrogen storefront (React Router 7 / Remix, full SSR) owns the entire browsing and product experience, while Shopify is used only for the catalog, cart, and hosted checkout.
The storefront is deployed off Oxygen, on Cloudflare Workers, connected through Shopify's Headless channel and Storefront API tokens rather than the default Shopify hosting. That choice buys edge rendering, full control of the front-end framework and markup, and a clean separation between the custom UI and Shopify's commerce engine — at the cost of owning several things a stock theme gives you for free (routing, redirects, catalog-to-ad plumbing), which is where the real work was.
02The problem
A themed Shopify store can't express a true product configurator. For custom bandanas, price isn't a fixed number on a variant — it's a function of size × quantity, with a per-piece rate that steps down as the order grows and a minimum order built in. Off the shelf, that means either hundreds of pre-baked variants or a bolt-on app that fights the native cart and checkout.
On top of that, the business wanted a premium, brand-led storefront (bold type, lots of whitespace, pill buttons) that a Liquid theme couldn't deliver without constant compromise — and it wanted the custom-order details to survive all the way through to the order confirmation email, which a standard variant-based flow quietly drops.
03What I built
- A custom-print configurator — pick shape, size, quantity and artwork, with pricing computed live rather than read off a static variant.
- Size-and-quantity tiered pricing as a Shopify Function (cart_lines_discounts_generate_run) — the cart itself re-prices eligible lines by size and quantity, enforcing the per-piece cost and the minimum order, so the native cart and hosted checkout stay the source of truth. No custom checkout.
- URL-driven variant selection (?Color=…&Size=…) — selection lives in the URL, so every configured product is SSR-rendered and shareable, not trapped in client state.
- Order detail pass-through to the confirmation email — the custom-print spec renders on the order email as line-item properties via Shopify's notification Liquid, so a custom order arrives fully described.
- A collections-driven storefront and design system — nav, PDP, header and footer and all UI built on a documented token set and component library rather than a theme; headless means none of this comes out of the box.
- Edge deploy and analytics pipeline — Cloudflare Workers hosting, plus GTM, Meta pixel and server-side CAPI tracking wired to work across a headless front end and a Shopify-hosted checkout on two different domains.
A stock theme gives you none of the first four: a theme can't re-price a line by a size-and-quantity formula inside checkout, can't keep variant state SSR-shareable in the URL by default, and doesn't carry a configurator's spec onto the receipt.
04The hard part
The genuinely difficult part wasn't the configurator — it was a domain seam that only headless builds have, and that bit hardest where it was least visible: Facebook ads.
In a headless Shopify setup, your products live on the Hydrogen front end at the apex domain, but they are not on Shopify's Online Store channel. Shopify's own checkout and online-store domain therefore 404s on /products/<handle>. That's fine for normal browsing — the Hydrogen Worker serves the apex perfectly — but Shopify's Facebook/Meta catalog sync pushes the canonical link pointing at that online-store domain. So every “Shop now” ad sent shoppers to a 404 that a flaky client-side redirect theme then bounced to the homepage. The ads looked fine; the money was leaking silently.
What I tried first that didn't work: the obvious fix — a Commerce Manager feed rule to find-and-replace the domain — didn't stick, because the Shopify partner data source re-pushes the canonical link on every sync and overwrites the rule. I also confirmed the catalog itself was contaminated (it had been merged with an unrelated catalog), which made bulk edits risky.
How I solved it: I went below the feed rules, overriding the product url field directly via the Meta Catalog API — segmenting strictly on brand so a sibling catalog was never touched — then verified the override held across sync cycles. The permanent fix is to stop depending on Shopify's push entirely: a Hydrogen-served feed route (apex links, in-stock only, variant IDs matched to the pixel) feeding a clean, separate catalog, so the links can never regress to the 404 domain.
The warning to another developer: in headless Shopify, your product URLs have two sources of truth — your Worker and Shopify's channel sync — and they disagree. Assume anything Shopify generates (catalog links, redirects, sitemaps) points at the wrong domain until proven otherwise, and own that layer yourself.
05Key learnings
- Pricing logic will try to live in three places — keep it in one, or document the sync. The tier table exists in the Function, the Function's settings UI, and the storefront's display code; they must agree or the cart contradicts the PDP. Next time I'd drive all three from a single source.
- Headless means you inherit Shopify's plumbing problems, not just its freedom. Redirects, catalog links and channel visibility are now your code. Budget real time for the last mile between Shopify and the outside world — ads, SEO, email — because it is where headless quietly breaks.
- A Shopify partner data source overrides your manual catalog edits, and it isn't in the docs. Feed rules lose to the native sync on every refresh. The reliable lever is the Catalog API field override, or better, your own feed the partner source can't touch.
- Keep variant state in the URL from day one. Making selection SSR-shareable up front is almost free; retrofitting it after you've leaned on client state is painful — and it is what makes product links work everywhere: ads, shares, previews.
Screens



