VeloDev
arrow_backBack to Portfolio
Case Study

Matrix UK

B2B Custom Shutter & Awning Platform

Matrix UK is a production-grade custom WordPress and WooCommerce B2B platform serving a dealer-network for made-to-measure window coverings. Housing a dual-currency pricing engine, multi-cart session management, and custom database tracking, the platform manages the entire product cycle: configuration, logistics grouping, custom invoicing, and helpdesk queries.

RoleCreator & Core Maintainer
TimelineActive Production
CategoryB2B Trade Platform / E-commerce
Core EngineWP Core + Child Theme Monolith
Technology Stack
WordPressWooCommercePHP 7.4+MySQLjQueryBootstrapSelect2QuickBooks OAuth2 SDKHighchartsTCPDF / mPDFAJAX Core APIs
lockhttps://matrix-uk-live.com/wp-admin/post.php?post=37756
WORKSPACE SCREENS (8)
Switch tabs to preview configuration steps and CRM listings. Click screenshot to zoom.
WooCommerce Order Details & Logistics
zoom_inZoom Screenshot

infoWooCommerce Order Details & Logistics

WooCommerce order details page in the WordPress admin panel showing order items, sea/air shipping, container associations, QuickBooks invoice sync status, and pricing overrides.


Engineering snapshot

Challenge, ownership, decisions, result

Challenge

A UK dealer network for made-to-measure shutters and awnings needed the entire trade cycle handled in one system: dual-currency pricing, sea/air shipping logistics, accounting sync, and a helpdesk — on top of a WordPress/WooCommerce stack never built for that scope.

What I owned
  • Design and implementation of the custom shutter/awning module plugin, including the pricing calculator and its 13-phase calculation engine.
  • The multi-cart session override system letting a single dealer login run several concurrent buyer carts.
  • The custom relational database schema (order, attribute, and property tables) that replaced generic WordPress postmeta for configurator data.
  • Ongoing core maintenance: logistics/container grouping, QuickBooks OAuth2 invoicing sync, and the Highcharts reporting dashboards.
Result
  • check_smallA single platform now runs configuration, pricing, logistics, invoicing, and support for the dealer network, instead of separate spreadsheets and manual steps.
  • check_smallThe pricing engine handles dozens of material, shape, and surcharge combinations in GBP and USD without the two currencies ever going out of sync.
  • check_smallThe platform has stayed in active production use through continued feature growth, including the QuickBooks and multi-cart additions.
Key engineering decisions
01

Isolate the domain logic in a dedicated plugin

The shutter/awning configurator, its pricing rules, and its database tables live in a standalone plugin rather than scattered theme code, so the calculation engine can be reasoned about and changed independently of WordPress core and theme updates.

02

Replace generic postmeta with a purpose-built schema

Configurator dimensions and attributes are read and written through custom MySQL tables (wp_shutter_attributes, wp_property_values, and related) instead of the WordPress postmeta table, which keeps pricing lookups and reporting queries fast at the current order volume.

03

Compute both currencies in one pass

The 13-phase pricing engine derives GBP and USD totals from the same material, style, and surcharge rules in parallel, so the two price lists cannot drift out of sync with each other.

04

Session-override the cart instead of forcing dealers to log out

A dealer serving several clients back-to-back needed independent carts without juggling accounts, so cart state is mapped to synthetic per-customer IDs inside one dealer session rather than WooCommerce's default single-session cart.


Monolithic Child-Theme Architecture

Matrix UK leverages a highly customized WordPress child-theme pattern, coupling business databases directly with calculation controllers and frontend accordion interfaces.

WordPress Core & WooCommerce

Storefront Child ThemeBusiness Logic & Fulfilment

Handles container logistics grouping, customer tickets support, warranty repairs, and Highcharts sales reporting dashboard.

Multi-Cart Session Overridebmc_woocom_multisession

Allows a dealer login to run independent ordering cards concurrently mapped to custom customer IDs.

Shutter Module PluginProduct Configuration Engine

Coordinates shortcodes, accordion forms, jQuery events visibility rules (~40K LOC), and custom database attribute tables.

Platform Capabilities & Features

A comprehensive overview of features powering the Matrix UK monolithic infrastructure:

architecture

Bespoke Product Forms

14 custom shortcodes drive Standard Shutters, Bay Window configurations, and Blackout frames. Built using clean Bootstrap accordions, hand-maintained jQuery scripts, and live AJAX.

calculate

13-Phase Pricing Engine

Calculates GBP and USD prices in parallel. Computes SQM limits, material uplifts (8 custom species), style discounts, buildout specifications, and color surcharges based on per-user metadata settings.

local_shipping

Shipping & Containers

Logistics custom post types group customer orders into physical container manifests, calculating freight costs, sea/air shipping logistics, and packing lists exportable to CSV.

receipt_long

QuickBooks OAuth2 Sync

Bespoke accounting integration mapped via QuickBooks OAuth2 SDK, auto-generating invoices on WooCommerce order creation and routing line items dynamically per customer company codes.

group_work

Multi-Cart dealer login

Bypasses standard single-session limits to let a master dealer log in and run, manage, and checkout independent buyer carts concurrently mapped to temporary synthetic IDs.

poll

Highcharts Analytics

Provides salesmen, sub-dealers, and administrators with role-scoped analytical dashboards, visualizing monthly transaction values, materials ratios, and SQM totals.

CORE DOMAIN CALCULATION ENGINE

The 13-Phase Pricing Architecture

The heart of Matrix UK is the calculator engine written in custom OOP PHP (class-pricing-calculator.php). It calculates base material rates, shapes, and frames in parallel for GBP and USD.

Calculation Phases

  • 1. SQM Floor Enforcement: Min 0.5 SQM validation rule.
  • 2. Material Rates Lookup: Reads custom meta cards dynamically (Earth, Green, Ecowood, Biowood, Basswood).
  • 3. Style Discounts: Applies panel-only (-5.45%) or fixed (-3.45%) uplifts.
  • 4-8. Custom Shapes Surcharges: Adds combi, arched, or tracked position parameters.
  • 9. Buildout Rule: Sets fixed 20% surcharge if frame depth + buildout > 100mm.
  • 10-12. Frame, Hinge, and Posts: Adds stiles, hinges (concealed/locking), and bay window post adjustments.

terminalPHP Formulas

$sqm = ($width * $height) / 1000000;
if ($sqm < 0.5) $sqm = 0.5;

$base_gbp = $sqm * $material_rate_gbp;
$base_usd = $sqm * $material_rate_usd;

if ($frame_depth + $buildout > 100) {
    $surcharge = $base_gbp * 0.20;
}
if ($panel_width < 200) {
    $panel_fee = 30; // GBP
}

Custom Database Tables & Post Types

By avoiding the generic WordPress postmeta table mapping for configurator dimensions, Matrix UK leverages a optimized custom relational schema in MySQL:

table_rowsCustom SQL Schema

• wp_custom_orders
• wp_shutter_attributes
• wp_shutter_names
• wp_property_values
• wp_property_fields

bookmarkCustom Post Types

• container (Logistics)
• order_repair (Warranty)
• stgh_ticket (Support)
• appcart (REST Buffer)

swap_horizThird-Party APIs

• QuickBooks V3 Invoicing SDK
• Catchers Helpdesk system
• YITH custom WooCommerce order statuses
• Tablet Rest API integration

Project Screen Library

Click on any of the screenshots below to open them in the lightbox viewer.

WooCommerce Order Details & Logistics
zoom_in
Confirm Shutter Canvas Drawing
zoom_in
Shutters Configurator Form
zoom_in
Add Awning Configurator
zoom_in
Dealer Portfolio SQM Dashboard
zoom_in
Shipping Containers & Logistics
zoom_in
Sales & Volume Reports
zoom_in
Multi-Cart Management Workspace
zoom_in