> For the complete documentation index, see [llms.txt](https://docs.fact-finder.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fact-finder.com/shopware6/fact-finder-web-components-for-shopware-6/web-components-and-customization.md).

# Web Components and customization

The plugin supports classic Twig-rendered Shopware storefronts only.

### Web Components integration

The plugin loads its scripts automatically through `Resources/views/storefront/layout/meta.html.twig`. If your theme does not extend that template, load these scripts in this order:

1. `custom-elements-es5-adapter.js`
2. `webcomponents-loader.js`
3. `bundle.js`

Configuration is generated in `Resources/views/storefront/base.html.twig`. Themes that do not extend the default Storefront must add this configuration.

Templates are in `Resources/views/storefront/`. Extend them with `sw_extends`. Web Component HTML templates use Handlebars.

Implemented components include search, suggestions, records, ASN, sorting, paging, filters, campaigns, recommendations, similar products, and checkout tracking.

### Tracking

The plugin tracks login, product clicks, add-to-cart events, and purchases. Product clicks use record template directives. Purchases use `ff-checkout-tracking`.

### Extend the feed

Create a class implementing `FieldInterface` to export a custom column. Implement `getName()`, `getValue()`, and `getCompatibleEntityTypes()`.

Register the class as a Symfony service. Autoconfiguration applies the `factfinder.export.field` tag.

To export additional values from variants, tag the field with `factfinder.export.variant_field`. Add necessary associations through `factfinder.export.associations`.

{% hint style="warning" %}
Additional associations can reduce export performance.
{% endhint %}

### Extend components and responses

Override a component's Twig block to customize rendered HTML. For example, extend `record-list.html.twig` and override `component_factfinder_record`.

Use an `EnrichProxyDataEvent` subscriber to modify FACT-Finder data returned through the proxy.

### Customize field roles

Override `factfinder.field_roles` in your application's `services.xml` when your feed uses different column names. Application parameters take precedence over plugin defaults.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fact-finder.com/shopware6/fact-finder-web-components-for-shopware-6/web-components-and-customization.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
