← Back to portfolio
Completed2024 – Present

Drox Auto – Custom WordPress/WooCommerce Theme with B2B/B2C Dual Structure

A fully custom WordPress/WooCommerce theme for automotive parts e-commerce, featuring a dual B2B/B2C architecture, vehicle compatibility search, live search, advanced category filtering, and 36 Customizer sections.

Role: Lead WordPress Developer

Client: Drox Auto

Drox Auto – Custom WordPress/WooCommerce Theme with B2B/B2C Dual Structure

Problem

An auto parts e-commerce business needs to serve both B2B wholesale clients and B2C retail customers from a single WordPress/WooCommerce installation. Customers must find parts compatible with their specific vehicle (brand, model, engine), search by VIN number, and browse categories with advanced filtering. The theme must integrate deeply with a custom vehicle management plugin, provide a complete after-sales experience (returns, claims, invoices), and offer extensive Customizer options for the marketing team — all while maintaining fast performance and clean code.

Solution

Drox Auto is a custom WordPress theme built from scratch with a dual B2B/B2C architecture. The header, footer, and navigation switch automatically based on user role. Vehicle compatibility search is powered by a brand → model → engine hierarchy on the homepage, with VIN search via Autoref API. Live search provides instant product + category results with SKU/OEM/reference matching. Category archives feature AJAX filtering by supplier brand, price range, stock status, product type, and subcategories. The theme integrates with drox-vehicle-manager for product-engine linking and drox-order-manager for returns, claims, and invoices. 36 Customizer sections give the marketing team full control over every homepage section, blog layout, checkout fields, and My Account dashboard — all without touching code.

Tech Stack

PHP 7.4+WordPress 6.0+WooCommerce (5.0 – 8.0+)MySQLJavaScript (Vanilla JS, jQuery)CSS3 (Modular, 28 stylesheets)SCSS (source directory)AJAX (WordPress admin-ajax.php)WordPress Customizer APIWordPress Theme Hooks (Actions & Filters)WordPress Navigation MenusWordPress Widget SystemCustom Page Templates (6 templates)Template Parts (40+ template parts)SVG Icons (inline)Google Fonts (Barlow + Barlow Condensed)Autoref API (VIN Resolution)drox-vehicle-manager plugin integrationdrox-order-manager plugin integration13 Custom Database Tables (via plugin)

Architecture

  • WordPress Theme Architecture with Class Autoloading
  • Singleton Pattern for all theme classes
  • Dual B2B/B2C Conditional Rendering
  • WooCommerce Theme Integration (dequeue default styles, custom templates)
  • Customizer-Driven Section Rendering (36 panels)
  • AJAX Handler Layer (7 public endpoints)
  • Service Layer Integration (Vehicle Repository, Product Type Repository, Category SEO Repository)
  • Template Parts Architecture (40+ reusable partials)
  • Modular CSS/JS with Conditional Enqueuing
  • Page Template System (6 custom templates)
  • Walker Nav Menu Dropdown
  • Custom Customizer Controls (Repeater, Sortable, Brand Sorter, Badge, Slide, Benefit, Partner)
  • Vehicle Search → Category Archive → Product Listing Pipeline
  • Category Scope Detection (Origine vs Compatible)
  • Extended Product Search with Meta JOIN Clauses
  • B2B Role-Based Template Switching
  • Checkout Field Visibility System (hide/optional/required)
  • My Account Endpoint Extension (returns, claims, factures)

Features

Dual B2B/B2C header and footer architecture

Conditional template rendering based on user role (B2B vs B2C)

Vehicle compatibility search (Brand → Model → Engine hierarchy)

VIN number search via Autoref API integration

Live search dropdown with product + category results

Extended product search (SKU, reference, OEM numbers, supplier brand)

Category archive with AJAX filtering (supplier, price, stock, type, subcategories)

Vehicle-filtered category pages (engine_id parameter)

Category scope detection (Origine vs Compatible product types)

Category SEO meta overrides (title + description per category+brand)

Vehicle Categories page template with breadcrumb and engine card

Brands page template (Pièce Origine) with alphabetical navigation

Hero slider with Customizer-driven slides

Hero search with tabbed vehicle finder (brand/model/engine + VIN)

Mega menu with Origine brand grid

Trust badges section

Partners marquee section

Newsletter section

App promo section

Pro banner section

Product selection section

Categories grid section

B2B floating badge

B2B portal page template

B2B registration page template

Landing page template

Fullwidth page template

Magazine-style blog with hero image, reading time, share buttons

Blog archive with AJAX load-more pagination

Single post with author box, related posts, post navigation, comments

Blog preview section on homepage

WooCommerce My Account with custom dashboard (stats, recent orders, returns, claims)

My Account nav with SVG icons and custom endpoint ordering

Custom checkout with VIN field (optional/required/hide)

Checkout field visibility control (hide/optional/required per field)

Force classic checkout (block checkout override)

WooCommerce product loop customizations

WooCommerce single product customizations

WooCommerce cart page styling

WooCommerce My Account page styling

Custom image sizes (droxauto-card, droxauto-gallery)

5 navigation menus (primary, footer, footer_service, footer_legal, b2b_quick)

36 Customizer sections with custom controls (repeater, sortable, brand sorter, badge)

7 AJAX handlers (vehicle search, live search, search filter, category archive, single product, blog, vehicle products)

28 CSS stylesheets (modular, conditional loading)

23+ JavaScript modules (modular, conditional loading)

6 Customizer-specific JavaScript files

3 B2B JavaScript modules (account switcher, bulk order, quote request)

Button hover FX with magnetic effect

Top bar with marquee animation

Mega menu CSS and JS

Vehicle search CSS and JS

Vehicle categories CSS

Brands page CSS

Vehicle products listing CSS

Category archive CSS

Single product CSS

Search results CSS

My Account CSS with inline AST theme overrides

Checkout CSS with inline AST theme overrides

Footer CSS

SCSS source directory for future build pipeline

WordPress text domain: droxauto

French language UI (Morocco market)

About this project

Drox Auto is a custom WordPress theme built from scratch for an automotive parts e-commerce business serving both B2B wholesale clients and B2C retail customers. The theme's core innovation is its dual architecture — B2B users see a completely different header, footer, navigation, and account experience than B2C visitors, all from the same WordPress installation.

The homepage centers on vehicle compatibility search. Customers select their car's brand, model, and engine from a cascading dropdown powered by the drox-vehicle-manager plugin, or search directly by VIN number through the Autoref API. The hero section also includes a tabbed interface switching between the vehicle finder and VIN search, with a hero slider, trust badges, partners marquee, and product selection sections below.

Live search provides instant results as customers type, matching products by title, SKU, reference, OEM numbers, and supplier brand. The search dropdown shows product thumbnails, prices, match indicators, and category suggestions — all via AJAX with no page reload.

Category archive pages feature a comprehensive filtering system: supplier brand checkboxes, price range slider, stock status toggle, product type taxonomy filter, subcategory navigation, and search within category. Filters work via AJAX, returning rendered product cards and pagination without full page reloads. When a vehicle engine is selected, the category page filters products to only those compatible with that engine.

The theme integrates category SEO management from the drox-vehicle-manager plugin, overriding the document title and meta description on category archives. Placeholders like {category}, {brand}, and {model} are replaced dynamically based on the current context — allowing unique SEO metadata for every category+brand combination.

The blog system provides a magazine-style experience with a hero image overlay, category badge, reading time calculation, and social share buttons (Facebook, Twitter, LinkedIn, WhatsApp). Single posts include an author box, related posts grid, post navigation, and comments. The blog archive uses AJAX load-more pagination.

WooCommerce pages receive extensive customization: the My Account dashboard shows order stats, total spent, active returns/claims, and recent orders with French status badges. The checkout page includes a configurable VIN field and per-field visibility controls. Both pages override AST theme container styles for full-width layouts.

The theme's 36 Customizer sections control every visual and functional aspect — from the top bar marquee messages and hero slider content to the footer layout, blog colors, checkout field visibility, and My Account dashboard toggles. Custom repeater controls manage slides, trust badges, partners, benefits, and category grids without code changes.

All 28 CSS stylesheets and 23+ JavaScript modules load conditionally based on the current page context — vehicle search JS only loads on the homepage, category archive JS only on product_cat pages, and cart JS only on the cart page. This ensures optimal performance despite the theme's extensive feature set.

Challenges

  • Designing a dual B2B/B2C architecture with conditional template rendering
  • Building a vehicle compatibility search pipeline (Brand → Model → Engine → Products)
  • Integrating VIN search via Autoref API with error handling and multi-candidate matching
  • Implementing live search with extended meta search (SKU, reference, OEM, supplier brand)
  • Creating AJAX-powered category archive filtering with multiple filter dimensions
  • Building vehicle-filtered category pages (engine_id parameter integration)
  • Implementing category scope detection (Origine vs Compatible) for product type filtering
  • Creating category SEO meta overrides with placeholder replacement per category+brand
  • Building 36 Customizer sections with 6 custom control types (repeater, sortable, brand sorter, badge, slide, benefit, partner)
  • Designing a magazine-style blog with hero image, reading time, share buttons, and related posts
  • Creating a custom My Account dashboard with stats, recent orders, returns, and claims
  • Implementing checkout field visibility control (hide/optional/required) per field
  • Force-overriding WooCommerce block checkout with classic shortcode checkout
  • Conditional asset loading (28 CSS + 23 JS files loaded only when needed)
  • Integrating with two companion plugins (drox-vehicle-manager, drox-order-manager) gracefully
  • Overriding AST theme container styles for WooCommerce pages via inline CSS
  • Building a mega menu with Origine brand grid from product category taxonomy

Results

  • Complete B2B/B2C dual storefront from a single WordPress installation
  • Vehicle compatibility search with brand → model → engine hierarchy
  • VIN search powered by Autoref API with multi-candidate resolution
  • Live search with instant product + category results
  • Extended search matching SKU, reference, OEM numbers, and supplier brand
  • AJAX-powered category filtering (supplier, price, stock, type, subcategories)
  • Category SEO optimization with per-category+brand meta overrides
  • 36 Customizer sections for full marketing team control
  • Magazine-style blog with reading time and social sharing
  • Custom My Account dashboard with order stats and after-sales integration
  • Customizable checkout with VIN field support
  • Modular asset system with 28 CSS and 23+ JS files
  • 6 custom page templates for different content needs
  • Seamless integration with drox-vehicle-manager and drox-order-manager plugins
  • Professional French-language UI for the Moroccan market

Gallery

Drox Auto – Custom WordPress/WooCommerce Theme with B2B/B2C Dual Structure screenshot 1
1 / 11

Community

GitHub

Social Media

Linkedin
© Taoufik Boucetta 2026 Inc. All rights reserved.