Skip to main content

Suma Elementor Theme

Location: web/app/themes/suma-elementor/ Version: 2.3.0 Author: Rhino Group Based on: Hello Elementor (lightweight Elementor-optimized base)


Overviewโ€‹

suma-elementor is the only active theme on Scottsdale Mint. It is built on top of Hello Elementor โ€” a minimal, performance-focused base theme designed for maximal Elementor compatibility. The theme adds extensive WooCommerce customizations, precious metals pricing logic, REST API endpoints, and integrations with all major third-party services.

All front-end pages are built and managed in Elementor Pro. The theme provides the structural foundation, custom Elementor widgets, dynamic tags, and the PHP business logic that powers those pages.


Architectureโ€‹

The theme is organized as a collection of focused PHP classes under inc/. Each class has a single responsibility and registers its own WordPress hooks. The \Suma\Theme class acts as the entrypoint that loads everything.

suma-elementor/
โ”œโ”€โ”€ functions.php โ† Bootstrap: requires inc/class-theme.php, calls Theme::init()
โ”œโ”€โ”€ style.css โ† Theme header declaration
โ”œโ”€โ”€ inc/
โ”‚ โ”œโ”€โ”€ class-theme.php โ† Main entrypoint (loads all classes)
โ”‚ โ”œโ”€โ”€ class-woocommerce.php โ† 760+ line WC integration hub
โ”‚ โ””โ”€โ”€ [50+ classes]
โ”œโ”€โ”€ dist/ โ† Compiled assets (Webpack Mix output)
โ”‚ โ”œโ”€โ”€ css/global.css
โ”‚ โ””โ”€โ”€ js/global.js
โ”œโ”€โ”€ src/ โ† Source files
โ”‚ โ”œโ”€โ”€ scss/ โ† SCSS source
โ”‚ โ””โ”€โ”€ js/ โ† JavaScript source (ES6)
โ”œโ”€โ”€ template-parts/ โ† Reusable PHP template fragments
โ”œโ”€โ”€ woocommerce/ โ† WooCommerce template overrides
โ””โ”€โ”€ cryptowoo/ โ† CryptoWoo template overrides

Class Hierarchyโ€‹

Core Theme Classesโ€‹

ClassNamespaceFileResponsibility
Theme\Suma\Themeclass-theme.phpEntrypoint; loads all classes
Admin\Suma\Theme\Adminclass-admin.phpWP admin customizations
Frontend\Suma\Theme\Frontendclass-frontend.phpFrontend scripts, head/body injection
Customizer\Suma\Theme\Customizerclass-customizer.phpWordPress Customizer options
Elementor\Suma\Theme\Elementorclass-elementor.phpElementor extension registration
Elementor_Widgets\Suma\Theme\Elementor_Widgetsclass-elementor-widgets.phpCustom widget registration
WooCommerce\Suma\WooCommerceclass-woocommerce.phpWC hooks, filters, and integrations
User\Suma\Theme\Userclass-user.phpUser account, roles, meta
Post\Suma\Postclass-post.phpPost type utilities
Settings\Suma\Theme\Settingsclass-settings.phpTheme settings/option keys
Translations\Suma\Translationsclass-translations.phpi18n utilities
Klaviyo\Suma\Klaviyoclass-klaviyo.phpKlaviyo API integration
Yotpo\Suma\Yotpoclass-yotpo.phpYotpo reviews integration
Pricing\Suma\Pricingclass-pricing.phpGlobal pricing manager
PricingTools\Suma\PricingToolsclass-pricing-tools.phpPricing calculation utilities
Trends\Suma\Trendsclass-trends.phpHistorical pricing trend data
Medoo\Suma\Medooclass-medoo.phpMedoo database wrapper

Sub-Directory Classesโ€‹

ClassNamespaceSub-Directory
Product\Pricing\Suma\Product\Pricingproduct/
Product\MetalPricing\Suma\Product\MetalPricingproduct/
Product\PriceUpdater\Suma\Product\PriceUpdaterproduct/
Product\Frontend\Suma\Product\Frontendproduct/
Product\AdminGrid\Suma\Product\AdminGridproduct/
Product\AdminEdit\Suma\Product\AdminEditproduct/
Product\PreserveStock\Suma\Product\PreserveStockproduct/
Product\ProductVisibility\Suma\Product\ProductVisibilityproduct/
Product\Stock\Suma\Product\Stockproduct/
Checkout\Frontend\Suma\Checkout\Frontendcheckout/
Checkout\Kount\Suma\Checkout\Kountcheckout/
Integration\Algolia\Suma\Integration\Algoliaintegration/
Integration\KountENS\Suma\Integration\KountENSintegration/
Integration\Walmart\Suma\Integration\Walmartintegration/
Integration\Translate_Press\Suma\Integration\Translate_Pressintegration/

WordPress Features Registeredโ€‹

The theme registers the following via add_theme_support():

add_theme_support( 'menus' );
add_theme_support( 'post-thumbnails' );
add_theme_support( 'align-wide' );
add_theme_support( 'post-formats', [ 'post', 'video' ] );
add_post_type_support( 'page', 'excerpt' );
Menu LocationDescription
primaryMain navigation bar
secondarySecondary navigation
footerFooter navigation

Build Systemโ€‹

The theme uses Webpack Mix (Laravel Mix) to compile assets:

# Install dependencies (from theme directory)
cd web/app/themes/suma-elementor
npm install

# Development build (watch mode with source maps)
npm run dev

# Production build (minified)
npm run production

# Build individual widget bundles
./build-widgets.sh # Mac/Linux
build-widgets.bat # Windows

Input: src/scss/*.scss and src/js/*.js Output: dist/css/global.css and dist/js/global.js

Tailwind CSS is configured in tailwind.config.js but may be partially active โ€” check src/scss/ for @tailwind directives.


Custom jQueryโ€‹

The theme loads a custom jQuery 3.4.1 from CDN instead of the WordPress-bundled jQuery. This is handled in class-theme.php:

// Dequeue WordPress bundled jQuery, enqueue CDN version
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'https://code.jquery.com/jquery-3.4.1.min.js', [], '3.4.1', false );
wp_enqueue_script( 'jquery' );

Template Hierarchyโ€‹

  1. Elementor page templates โ€” All custom-designed pages use Elementor templates
  2. template-parts/ โ€” Reusable PHP template fragments (header, footer, archive, single, 404)
  3. woocommerce/ โ€” WooCommerce template overrides (single product, cart, checkout, account)
  4. cryptowoo/ โ€” CryptoWoo payment template overrides
  5. index.php โ€” Fallback template for unmatched content

Database Options Used by Themeโ€‹

Option KeyDescription
suma_theme_settingsCore theme configuration
suma_product_pricingMetal pricing data (spot prices, premiums)
suma_pricing_cacheCached spot price data (Redis transient)
suma_mobile_app_tokensMobile app authentication tokens

Customizer Optionsโ€‹

Appearance โ†’ Customize

The Customizer class registers:

  • Site logo and header color options
  • WooCommerce display options (product grid columns, etc.)
  • Pricing algorithm display settings
  • Social media link fields