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
- Browser requests a page on WP Engine.
- WP Engine's reverse proxy serves cached HTML (full-page cache) if available.
- For cache misses or authenticated dealer sessions, WordPress boots.
- The Suma Elementor theme outputs the page structure using Elementor templates.
- Custom widgets and modules (registered by the theme) render dealer-specific UI elements (price ticker, order history, sub-account selector, etc.).
- AJAX requests (pricing, cart, orders) are handled by REST API endpoints registered by the theme's
Endpointsclasses. - Algolia powers the product search and catalog browse — prices are updated in the Algolia index by the Middleware Platform's pricing sync.
- WooCommerce handles cart, checkout, and order management.
Custom REST API Endpoints
The theme registers its own REST API routes under the suma/v1 namespace:
| Route | Method | Auth | Description |
|---|---|---|---|
/suma/v1/spot-prices | GET | Public | Returns current gold/silver spot prices |
/suma/v1/prices | POST | Token | Imports nFusion price data (used by Middleware sync) |
/suma/v1/user/* | Various | Nonce | User account management endpoints |
/suma/v1/coupon/* | Various | Nonce | Coupon validation/application |
/suma/v1/pricing-catalogs | Various | Nonce | Pricing catalog management |
/suma/v1/quote | Various | Nonce | Quote/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.)