The problem
Membership pricing is easy on a product page and hard in a cart. Every add, remove and join has to keep prices, savings and the free shipping bar correct without a page reload, and without disturbing the photobook designs customers build in a third party editor.
What I built
- Four cart states: below break-even, join, joined with live savings, and member with lifetime savings.
- A lifetime savings counter kept by two Shopify Flow workflows, adding on paid orders and subtracting on refunds.
- Product page price and join blocks, switched on per product with a single tag.
- A free shipping bar that rounds to whole pesos, and a guard that stops a membership being bought twice.
How I proved it
The result
Live, then extended to product pages in a second phase. I caught a pricing conflict before building on top of it, and fixed a gap from the first phase at no charge.
“Hafiz built out a set of custom cart drawer blocks for our membership program ... Everything works the way we spec’d it. He also set us up properly with GitHub instead of editing theme files directly, which I appreciated.”