eCommerce developmentApp developmentCustom developmentHeadlessMigrationReplatformingConsultingWeb designUX/UI designIntegrationMaintenanceShopify developmentShopify Website Development ServicesShopify Store DevelopmentShopify Speed OptimizationShopify Plus Development CompanyShopify Theme DevelopmentProfessional Shopify App Development ServicesProfessional Shopify Migration ServicesExpert Shopify CRO ServicesShopify Website Design ServicesShopify Development CompanyShopify Theme Customization ServicesShopify IntegrationShopify Store SetupShopify Conversion Rate OptimizationCustom softwareSaaS Development ServicesBlockchain Development ServicesFinancial Software Development ServicesMVP developmentConsultingMobile appsWeb portalsAI softwareMagento developmentIT staff augmentationBeringCa'PietraCultnaked – Fashion StoreIntoSocialWorld Jewish Travel - AI AssistantCote&CielBiomaAfterCartHey HolyBears with benefitsVintage furniture sellerBaketivityStellar SEO AppKing of ChristmasChemist4YouEasy ToolErgoBabyRevenue ForecastingNLPG MasterbookSelena TitanNetparcelBeautyInsighterCopperMountainAI Call QA PlatformAlbertbowWorld Jewish TravelGolden State UrologyLGFG Fashion HouseGLOCK WatchesWhat Is Agentic Commerce? The Next Revolution in Digital ShoppingHow Much Does AI App Development Cost in 2026?5 Signs Your AI App Isn’t Ready for LaunchWhy Modern Consumer Brands FailFrom Store Staff to eCommerce Director: Scaling a Norwegian Denim Brand Globally

Selling Tiles by m² and by the Box on Shopify for Baked Tiles

Baked Tiles sells designer tiles: customers measure in square meters, while the store ships by piece and by box. We taught the Shopify store to calculate quantities the way a tiler does and updated the product page, sample ordering, and complementary product suggestions - all within the client’s existing Shopify theme.

Jack Ananchenko

Reviewed by: Jack Ananchenko, Co-founder, CEO

Nov 25, 20268 min read
UKUK
Selling Tiles by m² and by the Box on Shopify for Baked Tiles

Baked Tiles - Wales, UK

E-commerce / Home & Interior Design, designer tiles and interior design services

The Essentials

CRO Audit

UX/UI Design

Speed Optimization

Shopify Development

Ongoing Shopify Store Support

4 Stellar Specialists

October 2025 - present

Tile calculator

Box-based sales logic

New product detail page (PDP)

Sample ordering, upselling, and cross-selling in the cart

May 1 – July 6, 2026: +15% Sales Growth

5,125 orders

36.8% Returning Customer Rate

Tech Stack

Shopify Online Store 2.0LiquidMetafields/MetaobjectsVanilla JavaScriptCustom ElementsAjax Cart APIRoomvo

Why the Shopify Tile Store Calculated Orders Incorrectly

Baked Tiles is a British retailer of designer tiles. The store was already running on Shopify Online Store 2.0 when partners referred the client to us. We started with speed optimization, a CRO audit, and a product detail page redesign, then took over ongoing store support. The client's team defines most tasks independently: what they need from us is expertise and a solution that works reliably.

Prices on the website are listed per square meter, while products are sold by piece and by box, so every order requires a quantity conversion. This conversion was handled by a legacy calculator from a page builder. It used standard rounding, which meant that at certain threshold values, it could underestimate the required quantity of tiles.

In addition, the calculation logic was scattered throughout the code: the product page could display one quantity while passing another to the cart. The problem was not with the platform but with the business-specific logic: a standard online store does not understand how tiles are actually sold.

For the business, the cost of such an error is not website downtime but an incorrect order. If there are not enough tiles, purchasing additional ones in the same shade later is often impossible because a new batch may differ in color. Any order with an incorrect quantity can result in a return, with logistics costs covered by the store. And peak demand falls during the renovation season, spring and summer, when such mistakes are most costly.

Key Results: Tile Calculator on Shopify

+15%

Sales

Sales increased by 15% following the redesign of the store and the customer purchase journey.

3

Units, 1 Set of Rules

Tiles, boxes, and m² are calculated using the same rules on the product page and in the cart.

Independent Management

The client's team can update content and sample limits through Theme Editor and Metaobjects without making changes to the code.

Shopify's Standard Logic Did Not Support the Tile Sales Model

The main challenge was that Shopify's standard logic did not account for the specifics of selling tiles: a single product needed to be accurately calculated in tiles, boxes, and square meters, with consistent rules applied across the product page and the cart.

Conditions we worked under:

  • Shopify theme architecture only: no custom backend and no checkout modifications.

  • Legacy minified page builder code that was difficult to understand in some areas.

  • Legacy jQuery 3.5.1 alongside modern Custom Elements.

  • Samples are stored as variants within regular products.

Three Units of Measurement

A single product is sold in m², individual pieces, and boxes, with product-specific minimum quantities and order increments. These rules had to work consistently on both the product page and in the cart.

10% Allowance for Tile Cutting

An additional material allowance had to be automatically added to the calculated quantity, with the result rounded up - or rounded up to a full box for products sold in boxes.

Complementary Products Depend on the Area

The quantities of grout, adhesive, silicone, and profiles had to be recommended based on the calculated area.

Tile Sales Logic Within a Shopify Theme, Without Headless

The client didn’t need a new platform - they were missing domain-specific logic. That’s why we deliberately stayed within Shopify’s theme architecture instead of switching to headless: pages are built using Liquid sections and JSON templates, calculation data and settings are stored in Metafields and Metaobjects, and the calculator and interactive components are implemented using Vanilla JavaScript and Custom Elements. This allowed content managers to continue working in the familiar Shopify Admin, kept existing apps functioning, and eliminated the need to migrate already-ranking pages to a new frontend.

Tile Calculator. Customers enter room dimensions, including multiple surfaces at once, and instantly see how many tiles and boxes they need, accounting for cutting waste and stock availability.

Box-Based Sales Logic. Products can be sold both by the box and individually, with custom min and step rules. The same rules apply on the product page and in the side cart.

New Product Detail Page (PDP). We completely redesigned the page: a gallery with a PhotoSwipe lightbox, custom variant selection, an integrated calculator, sample ordering, Roomvo visualization, specifications, related products, and cross-sell offers.

Sample Ordering. We implemented logic for three types of samples - free, large, and full-size - with an overall limit and separate limits for each type. Popup content is managed through Metaobjects, and the technical sample variant ID is removed from the URL.

Cart Upsell and Cross-Sell. A custom popup suggests grout, adhesive, silicone, and profiles based on the calculated area. Products are added to the cart via AJAX, and the side cart updates without reloading the page.

From a Legacy jQuery Calculator to a Unified TileCalculator Model

1. Fragmented Legacy Logic

The inherited jQuery calculator used Math.round(). At boundary values, standard rounding could underestimate the required number of tiles or boxes.

In addition, the calculations for area, waste allowance, and box quantities were spread across different parts of the code. As a result, the PDP could display one quantity while passing another to the cart.

2. A Unified TileCalculator Model

We moved the critical logic into a separate ProductDetailsForm component with a unified TileCalculator model. The algorithm follows a consistent sequence:

  • calculates the required number of tiles for the entered area;

  • adds a 10% cutting waste allowance;

  • rounds the result up;

  • if the product is sold by the box, rounds the quantity up to a full box.

3. Inventory Availability

For products with inventory_policy: deny, the calculator checks the available stock. If there is insufficient inventory, the interface displays the available quantity and prevents users from adding an invalid amount to the cart.

Shopify still performs the final validation: if inventory changes between the calculation and the add-to-cart request, the user sees an error message from the Shopify API. With inventory_policy: continue, Shopify allows orders exceeding the current stock.

4. How We Isolated the Legacy Code

We didn't completely rewrite the minified page builder code. We kept it for legacy templates and specific upsell/page-builder scenarios, while gradually extracting critical business logic - the calculator, quantities, waste allowance, boxes, stock checks, and PDP - into separate, readable components.

5. Synchronizing Min/Step Rules Between the PDP and Cart

The PDP and cart use the same source data: product type, sold_as_box, tiles_per_box, inventory availability, and minimum quantity.

In the cart, these rules are passed through the HTML min and step attributes. If a customer manually changes the quantity, JavaScript normalizes it upward to the nearest valid increment. After each AJAX update, the side cart markup is rebuilt, ensuring the rules remain intact.

6. The Biggest Challenge

The biggest challenge was making a single product work correctly across three units of measurement - tiles, boxes, and m² - while ensuring customers saw the same quantity at every step: on the product page, in the cart, and after any manual adjustment.

7. Technology Stack

  • Shopify: Online Store 2.0, Liquid, JSON Templates, Metafields, Metaobjects, Ajax Cart API

  • Frontend: Vanilla JavaScript, Custom Elements, legacy jQuery 3.5.1

  • UI: Flickity, PhotoSwipe

  • Tile Visualization: Roomvo

  • Existing Store Integrations: Judge.me, Trustpilot, Swym, Klaviyo, Discount Ninja, Parcelify

  • Analytics: Hotjar

Results: Tile Calculator and New Product Detail Page for Baked Tiles

For Customers

  • Accurate Order Calculations. Customers get the required number of tiles and boxes, including a cutting waste allowance, reducing the risk of ordering too little material.

  • Consistent Quantities at Every Step. The product page and cart display the same quantity, and any manual changes in the cart are rounded up to the nearest valid increment.

  • No Orders Exceeding Available Stock. If a product cannot be backordered, customers immediately see the available quantity and cannot add more than what's in stock.

  • One Calculation for the Entire Renovation. The calculator handles multiple surfaces at once, while grout, adhesive, silicone, and profiles are recommended based on the calculated area.

  • More Informative Product Pages. The gallery, specifications, stock availability, calculator, Roomvo visualization, and related products are all available on a single page.

  • Straightforward Sample Ordering. Different sample types can be ordered through a single process, with helpful instructions in a popup.

  • Accurate Prices, Filters, and Cart Functionality. We fixed issues with pricing, product quantities, filters, cart functionality, and variant selection.

For the Business

  • Sales +15%. Sales increased following the store redesign.

  • No Unnecessary Infrastructure. We handled standard tasks using Shopify's built-in capabilities and existing integrations, developing custom code only for tile sales logic. This eliminated the need for a separate backend and servers: Shopify handles hosting, uptime, and scalability.

  • Content Management Without Developers. The client's team can update sample limits, content, and certain settings through the Theme Editor and Metaobjects without modifying the theme code. The team also received training to manage the store independently.

  • Lighter Pages. We optimized images, fonts, and third-party scripts.

Release Reliability

  • Engineering & Release Reliability. The calculator, quantity handling, and inventory checks were moved into separate, readable components, while the minified page builder code was retained only for legacy templates. As a result, changes to the calculator don't affect the inherited code.

  • Pre-Release Testing. Major features were first tested on a separate staging theme before being deployed to the live store.

  • Fast Fixes. Small changes and urgent fixes could move from development to code merge within a single day.

  • Rollback Capability. Code and previous versions are stored in Git, and an earlier theme version can be published if issues arise.

What's Next

Our collaboration with Baked Tiles continues: new tasks follow the same process - from the staging theme to the live store, with testing before every release.

  • linkedin
  • x
  • facebook
  • Clutch
  • Upwork
  • Reddit

Selling Products with Complex Calculation Logic ?

We'll help you add custom business logic to Shopify, redesign your product pages, and increase conversions - without unnecessarily complicating your infrastructure.


Jack ananchenko

Jack Ananchenko

CEO and Co-founder

Vladimir gubarev

Vladimir Gubarev

COO and Co-founder

By submitting this form, you agree to our Privacy Policy and Terms & Conditions.

How We Can Help You

See What Else We've Built