← All case studies
PDPMagento 2EXP-09Jul 2026

SA tiles & bathroom retailer · Tiles, bathroom & flooring retailRebuilding a tile calculator without breaking its maths

The native tile calculator was hard to use. Version one decorated the native modal; version two replaced it with a custom floor and wall calculator, ported from a validated clone of the original logic and hardened through a 29-bug QA thread.

ClientSA tiles & bathroom retailer
PlatformMagento 2
PagePDP
Measured onCalculator completion, ATC from calculator
Observation
  • Zone selection, adding areas and the summary were confusing enough that designers supplied six state frames.
  • The box-count logic, including ten percent wastage, had to stay exactly as the store calculated it.
  • Returning from the cart restored stale form values through browser form restoration.
Hypothesis

A clearer calculator with a floor and wall toggle, per-area cards and a summary sheet will increase calculator completion and add-to-cart of the computed box count.

What I built
  • v1: decorate the native modal, suppress its pseudo-element UI, filter zones with data attributes and CSS so native totals still include hidden cards, and reuse the native total-boxes element so counts update natively.
  • v2: a custom injected modal that takes over the calculator button, with independent floor and wall lists, a measuring guide accordion, add-area cards and a summary bottom sheet.
  • Calculation ported from a validated control clone. Add-to-cart writes quantity and area, dispatches the events the theme expects, and submits the native form.
  • Mobile full-screen sheet, reset on bfcache restore, verified in Playwright on desktop and iPhone SE.
The hard parts

Duplicate IDs

Never getElementById. Everything is decorated through attribute selectors that match both copies.

Losing to the theme's !important

Leftover gap and padding could not be overridden in CSS, so the decorate function neutralises them inline with setProperty and the important flag.

Outcome

Measured on calculator completion, atc from calculator. Test results belong to the client and are shared in conversation, with their permission, rather than published here.

More experiments

View all →