Skip to main content

Dealers Site Architecture Overview

The Dealers Site is a heavily customised WordPress + WooCommerce installation. Almost all bespoke logic lives in the Suma Elementor custom theme (wp-content/themes/suma-elementor), keeping the plugin layer clean and the codebase version-controlled.


High-Level Architecture

Browser (Dealer)


WP Engine CDN


WordPress / WooCommerce

├── Suma Elementor Theme ← All custom PHP logic
│ ├── inc/ ← Feature modules (classes)
│ ├── assets/ ← Compiled CSS/JS
│ └── woocommerce/ ← WC template overrides

├── Elementor Pro ← Page layout builder

├── WooCommerce ← Ecommerce engine

├── Algolia (plugin) ← Product search + pricing

└── 3rd-party Plugins ← See plugins section

Request Lifecycle

  1. Browser requests a page on WP Engine.
  2. WP Engine's reverse proxy serves cached HTML (full-page cache) if available.
  3. For cache misses or authenticated dealer sessions, WordPress boots.
  4. The Suma Elementor theme outputs the page structure using Elementor templates.
  5. Custom widgets and modules (registered by the theme) render dealer-specific UI elements (price ticker, order history, sub-account selector, etc.).
  6. AJAX requests (pricing, cart, orders) are handled by REST API endpoints registered by the theme's Endpoints classes.
  7. Algolia powers the product search and catalog browse — prices are updated in the Algolia index by the Middleware Platform's pricing sync.
  8. WooCommerce handles cart, checkout, and order management.

Custom REST API Endpoints

The theme registers its own REST API routes under the suma/v1 namespace:

RouteMethodAuthDescription
/suma/v1/spot-pricesGETPublicReturns current gold/silver spot prices
/suma/v1/pricesPOSTTokenImports nFusion price data (used by Middleware sync)
/suma/v1/user/*VariousNonceUser account management endpoints
/suma/v1/coupon/*VariousNonceCoupon validation/application
/suma/v1/pricing-catalogsVariousNoncePricing catalog management
/suma/v1/quoteVariousNonceQuote/RFQ workflow

Database

  • Standard WordPress database schema (wp_posts, wp_postmeta, wp_users, wp_usermeta, etc.)
  • WooCommerce adds its own tables (wp_wc_orders, wp_woocommerce_sessions, etc.)
  • Custom meta fields on users and products drive dealer-specific behaviour (pricing catalogs, markup rates, company taxonomy, etc.)