# Storefront Integration

The plugin renders FAQs in three places in the storefront:

1. The product detail page, automatically.
2. Inside Shopping Experiences, via two CMS elements.
3. As a `FAQPage` JSON-LD rich snippet in the page `<head>`, automatically.

## Product Detail Page

On every product detail page, the plugin loads all active FAQ groups whose dynamic product group matches the current product. Empty groups (without active entries) are not rendered.

The placement is controlled by the **FAQ placement on the product detail page** setting in the plugin configuration:

* **Tab before reviews** — A new tab "FAQ" is added to the product detail tab navigation, before the reviews tab.
* **Tab after reviews** (default) — The "FAQ" tab is added after the reviews tab.
* **Below description** — The FAQ block is rendered directly below the product description, without a tab.

Inside the FAQ block, every group renders its name (always) and its description (controlled by the "Group description visibility" setting), followed by an accordion of FAQ entries sorted by priority.

## Shopping Experiences

The plugin adds two CMS elements to Shopping Experiences, both available under the **FAQ** category in the element sidebar:

### FAQ Groups

Pick one or more FAQ groups to render. The element shows the selected groups in priority order. Each group renders its title, description (subject to the visibility settings) and the accordion of its active entries.

Useful for: a dedicated FAQ section on a landing page, where you want to bundle existing FAQ groups without having to recreate the content.

### FAQ Entries

Pick one or more individual FAQ entries to render. The element shows the selected entries in a single accordion, ignoring group boundaries.

Useful for: highlighting a few specific questions on the home page or a campaign landing page, independent of any group structure.

Both CMS elements emit the same `FAQPage` JSON-LD rich snippet for the entries they contain, so search engines can pick up the answers.

## Group Description Visibility

Whether the FAQ group description is rendered above the entries can be controlled at two levels:

1. **Plugin level** — Set "Group description visibility" in the plugin configuration to **Show** (default) or **Hide**. This is the global default.
2. **Per group** — On the FAQ group detail page, set "Group description visibility" to **Use plugin setting** (default), **Show** or **Hide**. The per-group value always wins over the plugin-wide setting.

This applies to both the product detail page and the Shopping Experiences elements.

## Rich Snippets (SEO)

Whenever FAQs are rendered (product detail page or Shopping Experiences), the plugin automatically injects a `FAQPage` JSON-LD rich snippet into the page `<head>`. The snippet contains the question and answer text of every rendered entry and is structured according to Schema.org's `FAQPage` schema, which makes the page eligible for Google's FAQ rich result.

You don't need to configure anything for this — the snippet is generated from the same data that is rendered on the page.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.premsoft.de/en/plugins/faq-products-+-shopping-experiences/storefront-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
