All projects
Shopify2026

Tierly — Quantity Breaks

Volume discounts that hold at checkout.

A Shopify app that lets merchants set quantity-break pricing — percent off, fixed amount or fixed price per item — on any product, collection or variant. The discount is applied by a Shopify Function running inside checkout, not by theme JavaScript.

280

Tests

6

Admin languages

0

Customer data stored

Highlights

  • Discount logic runs as a TypeScript Shopify Function compiled to WebAssembly, so checkout computes the price rather than trusting the theme.
  • An app-embed fallback block serves Online Store 1.0 themes that can’t host app blocks.
  • Only aggregated daily stats are persisted — no customer personal data reaches the database.

Stack

Next.jsShopify FunctionsWebAssemblyPrismaPolaris
Case study

The problem

I wanted to find out whether one engineer could take a Shopify app from an empty repository to a public App Store listing without the shortcuts that usually make that pace possible. The first commit landed on 30 June 2026; 233 commits later the listing went live on 30 July.

01

Put the pricing in checkout, not the theme

Storefront JavaScript can only ever describe a discount — checkout decides it. Tierly’s tiers are evaluated by a Shopify Function, TypeScript compiled to WebAssembly, that runs inside Shopify’s own checkout. The price is computed where the money is rather than where the DOM is.

02

Cover the combinations, not the happy path

253 server tests across 36 files, plus 27 against the Function itself. Percent, fixed-amount and fixed-price-per-item tiers each behave differently at the boundaries, and targeting spans all products, specific products, collections and variants — the products of those two axes are where the bugs live.

03

Assume the merchant’s theme is old

Three theme extension blocks ship with the app, one of them an app-embed fallback for Online Store 1.0 “vintage” themes that cannot host app blocks at all. Merchants still on those themes are exactly the ones least likely to have an alternative.

Outcome

Live on the App Store since 30 July 2026 in six admin languages, free for a single active offer. It stores no customer personal data — only aggregated daily stats — which kept the privacy surface small and the blast radius of a breach at zero.