Skip to content
Tyler Marshall

Engineering

Reference implementations, with the limits written down

Each one is a problem I have hit in production, rebuilt from scratch as something public. Source, tests, and an honest account of what the approach does not do.

Theme patternLiquid

Deriving feed attributes a catalog never stored

A hardware retailer needs its whole catalog in an advertising channel's schema, including the category and material attributes the product model never held as fields.

Known limits

Pagination
The catalog is served in fixed pages, and the channel must be configured with one fetch URL per page.
Derivation
Attributes are derived by ordered literal phrase matching over product text, so the first matching rule wins.
Truncation
A template cannot detect or report a response that was cut short, so a partial fetch reads as a complete catalog.
Currency
One rendered feed carries the one market and currency the storefront rendered it in.
Zero prices
Variants priced at or below zero are dropped from the feed with no record that they were dropped.
Catalog architecture
Shopify FunctionTypeScript

Preserving tiered set prices with Cart Transform

A merchant needs configurable greenhouse kits to use prices managed as catalog tiers while preserving each selected module as an order component that carries inventory.

Known limits

Carrier variant
Every price tier needs a real carrier variant; the Function cannot create or select that cart line.
Allocation
Equal component allocation misstates line value when selected items have different economic weights.
Selling plans
Selling plan lines cannot be expanded, so this contract cannot price subscription kits.
Stale IDs
Stale component IDs are detected only when Shopify applies the expansion.
Currency
The money model supports only presentment currencies with two decimal places.
Complex commercePlus platformCatalog architecture
Shopify FunctionTypeScript

Validating nested bundle integrity

A merchant needs configurable field monitoring kits to reach checkout only when every nested sensor module is authorized, correctly positioned, and attached to the real carrier.

Known limits

Repair
The Validation Function can block an invalid kit but cannot remove, repair, or change the parent relationships of its lines.
Error detail
Multiple invalid kits produce one generic cart error instead of repair instructions for each instance.
Nesting depth
The contract relies on parent relationships limited to one level and cannot represent modules nested beneath other modules.
Catalog IDs
Carrier policies authorize current variant IDs, so catalog replacements require policy migration before old IDs are retired.
Complex commercePlus platform
State modelTypeScript

Offering only the configurations that exist

A frame builder sells made-to-order bicycle frames whose valid combinations are a sparse tree rather than a grid, and every path a customer can finish has to end at something the shop can actually build.

Known limits

Tree size
The whole option tree is serialised into the page, so its weight scales with the catalog rather than with what the shopper selects.
Price range
Price ranges shown before a configuration is complete are authored alongside the tree, not read from the products behind it.
Stale leaves
Nothing verifies that a leaf still points at a product that exists.
Inventory
Availability is not part of the tree, so an unbuildable configuration is offered like any other.
Authoring
A theme cannot run validation when a merchant saves the tree, so a malformed branch is only detected when it is rendered.
Complex commerce
Theme patternLiquid

Dynamic catalog data through Liquid search

A merchant needs a large architectural lighting configurator to request only the selected product data without embedding the complete sibling catalog in the initial page.

Known limits

Data access
The search template can expose only catalog data available to the storefront.
Route caching
Cache behavior for alternate search views still needs a two request check on each deployed theme.
Projection size
Each response returns at most 120 option rows, so larger families need narrower requests.
Variant access
Products whose complete variant arrays are unavailable return an error and need a different data path.
Catalog architectureComplex commerce
State modelTypeScript

Safe reorder routing for transformed bundles

A merchant needs customers to reorder ordinary camping accessories without replaying transformed set components as loose, incorrectly priced merchandise.

Known limits

Selection state
Protected sets reopen as a clean configurator and never restore their historical selections.
Account surface
The order action is available only in Shopify's new customer accounts, not classic account templates.
Handoff trust
The URL fragment handoff is validated but not authenticated, so it cannot carry privileged variants, prices, or discounts.
Availability
Catalog availability checked on the order page is not an inventory reservation and can change before Cart Ajax runs.
Storefront origin
Configurator destinations must share the primary storefront origin.
Complex commercePlus platform
Shopify FunctionTypeScript

Gift qualification using cart relationships

A specialty coffee merchant needs one sample bag to become free only when a paid product at the top level qualifies, without bundle children creating or receiving manual entitlement.

Known limits

Gift insertion
The Discount Function cannot add a missing gift line; the shopper or storefront must put an eligible sample in the cart.
Shopper intent
When several samples qualify, the Function discounts the cheapest one rather than preserving shopper intent.
Nested lines
Nested merchandise can neither qualify nor receive the manual gift discount.
Product lists
The lists of allowed qualifier and gift products are capped at 50 product IDs each.
Combinations
Discount combinations remain an administrative policy outside this evaluator.
Complex commercePlus platform

None of this is client source code. Each repository is an original implementation of a problem I have solved under contract, rebuilt so that the code, the tests, and the failure behaviour can be read by anyone.

Want to see how this holds up in production?

The case studies are the same problems with a client, a deadline, and a legacy codebase attached.