Shopware 6 plugin resolving the best in-stock variant across 5 surfaces: listings, search, manufacturer pages, and PDP. Zero N+1 queries, one service.
A Shopware 6 store with extensive variant products was displaying inconsistent and often misleading product information across different storefront surfaces. Customers frequently encountered out-of-stock variants in listings while in-stock alternatives existed, eroding trust and causing unnecessary friction.
Each product surface had its own ad-hoc variant handling, creating a fragmented experience where the same product could appear differently depending on how the customer navigated to it. There was no single source of truth for variant resolution.
Built a centralized VariantPreselectionService with DBAL-powered queries that serves as the single source of truth for variant resolution across every product surface.
A reusable DBAL service that selects the best variant per parent product based on property group option position, with language-aware COALESCE fallbacks through the full language chain.
Prioritizes in-stock variants over out-of-stock ones. When no variant is in stock, falls back to the first by position so the display remains deterministic and merchandising-friendly.
Event-based subscribers hook into Shopware's product listing and variant resolution lifecycle to apply the same logic on category, search, manufacturer, PDP, and quote request surfaces.
Enriches every listed variant with a custom stock extension by querying sibling stock via DBAL, so templates can show accurate availability without additional API calls.
Category listings, search results, manufacturer pages, PDP, and quote request forms all resolve to the same best variant using a single service.
Product cards now reflect true availability by checking sibling variant stock, eliminating false out-of-stock signals when alternatives exist.
All variant resolution uses batched DBAL queries grouped by parent ID, avoiding the performance pitfall of per-product database calls.
When a customer explicitly selects a variant through the configurator, the system defers to their choice instead of overriding it with the pre-selected variant.
Variant-heavy catalogs need intelligent display logic to surface the right product at the right time. We build systems that optimize what your customers see.
Get Expert Help from Elixent Digital Book a Free ConsultationRebuilt Findologic search plugin for Shopware 6 with 100% test coverage, CI/CD via GitHub Actions, and multi-version support. Zero regressions shipped.
Read Case Study → Plugin DevelopmentNative donation plugins for Shopware 5, Shopware 6, Shopify, and WordPress with 100% feature parity. Built for a German charity across 4 platforms.
Read Case Study → B2B SolutionsShopware 6 B2B tender plugin for DACH enterprise: multi-level approvals, status-driven workflows, and self-service dashboard. 50% faster procurement.
Read Case Study →