- Home
- Case studies
- Made-to-measure worktops
A price calculator for made-to-measure worktops
A Danish worktop maker sells boards cut to size. Customers now pick a shape, a material and their measurements on the product page, see the exact price with VAT as they go, and order. A server prices every order again before it is created.
- Client
- Danish worktop maker
- Market
- Denmark, in Danish and English
- Platform
- Shopify, Wonder theme, plus a small server on Netlify
- Role
- Hafiz Fahad Munir, sole developer, through an agency partner
- When
- March 2026 to now
- Status
- Live and taking orders. Work continues in rounds.

Background
The client makes worktops to measure in Denmark. Every board is cut to order, so there is no fixed product and no fixed price to put in a cart. Their old price calculator ran outside Shopify.
Hafiz was brought in through an agency partner to build the calculator inside the Shopify store, working hourly from March 2026. The work has continued in rounds since then.
The challenge
A board can have one of 8 shapes, from a plain rectangle or a round top to L and U layouts made of two or three boards. Each board has its own length and width limits. On top of that come the material, thickness, edges, surface and cutouts for a sink or hob, and every choice changes the price.
The price on screen had to match what checkout charged, including 25% Danish VAT, down to the øre. Because that price is worked out in the customer’s browser, it also had to be impossible to change it there and pay less.
What was built
- A calculator in 7 steps on the product page: shape, main material, material, units and thickness, measurements, edges and surface.
- A drawing of the board that updates as the customer types, with the grain direction and every side labelled. Customers can download it, and it is saved to Shopify Files so it appears on the order in the admin and in the confirmation email.
- Prices and materials kept in metaobjects, so the client changes them in the Shopify admin without a developer.
- Checks that stop orders that cannot be made: minimum and maximum sizes, the space needed around cutouts, and corners that would overlap.
- A sink picker that fills in the cutout size from the chosen sink.
- A small server function on Netlify that prices the order again from the stored prices and creates a draft order. The browser never decides what the customer pays.
- Discount codes, and a custom order confirmation email.
Later rounds
- Stone as a second material: 21 stones, each with its own edges, cutouts and service packages, priced the same way from the admin.
- The real freight weight of every board, carried on each order.

How it works
Why the server prices the order again
Anything that runs in a browser can be edited by the person using it. So the calculator only shows the price. When the customer orders, the Netlify function reads the same metaobject prices, does the whole calculation again and creates the draft order with its own result.
A bug nobody could see
While adding stone, Hafiz found that the server had been quietly using a months-old backup of the prices. One API permission (read_metaobjects) was missing, so it could not read the current prices and fell back to the old copy without any error. The permission was added before the new materials went live.
Testing
Before launch, 504 combinations of shape, material and size were priced by the calculator and checked against the live store. All 504 matched. Draft orders match the calculator to the øre, VAT included.
| What was measured | Result |
|---|---|
| Price checks against the live store | 504, with 0 mismatches |
| Materials priced from the Shopify admin | 28 |
| Board shapes, drawn as the customer types | 8 |
| Calculator code | About 2,950 lines of plain JavaScript |
Result
The calculator is live and taking orders. Stone and freight weight were added in later rounds, and the work is ongoing.
Built with
Liquid, JavaScript web component, Metaobjects and metafields, Netlify Functions (Node), Admin GraphQL and REST APIs, Draft orders, Shopify Files.