Storefront integration and customization
Integrate, track, and extend FACT-Finder Web Components in a Twig storefront.
The plugin supports classic Twig-rendered storefronts only.
Include scripts and configuration
The plugin includes these files through Resources/views/storefront/layout/meta.html.twig, in this order:
Resources/public/ff-web-components/vendor/custom-elements-es5-adapter.js
Resources/public/ff-web-components/vendor/webcomponents-loader.js
Resources/public/ff-web-components/ff-web-components/bundle.jsInclude all three when your theme does not extend the default metadata template.
The plugin renders its configuration from Resources/views/storefront/base.html.twig. Themes that do not extend Shopware’s default base.html.twig must implement this configuration themselves.
Templates live in Resources/views/storefront/ and support multi-inheritance with sw_extends. Web Component HTML templates use Handlebars.
Tracking and implemented components
The plugin tracks login, product clicks, add-to-cart actions, and purchases. Login uses the configured user ID. Product clicks use record template directives. Add-to-cart uses a JavaScript plugin. Purchases use ff-checkout-tracking.
Implemented components include:
Header:
ff-searchboxandff-suggest.Results:
ff-record-list,ff-asn,ff-sortbox,ff-paging,ff-filter-cloud, advisor, feedback text, and redirect campaigns.Product and checkout: product campaigns, pushed products, recommendations, similar products, and checkout tracking.
Place global configuration in All Sales Channels. Only Channel and Disable FactFinder Web Components on frontend? vary per sales channel.
Override component templates
Override only the necessary Twig block:
The block controls the HTML rendered by the component.
Split ASN on category pages
Add two FF-ASN CMS elements. Configure the main ASN to divide groups into exclusive collections. Disable Filter Cloud because custom topics are unsupported.
To duplicate filters in a second ASN, use slice rather than the mutating splice. The DOM-updated listener can remain empty. Filter Cloud works when every group remains available in the first ASN.
Extend proxy responses
Enable the proxy, then subscribe to EnrichProxyDataEvent:
Use this event to add or transform returned FACT-Finder data before it reaches the storefront.
Last updated
Was this helpful?