# Custom fields

Custom fields are supported for every offer, via the Custom Fields panel on the offer detail page. To use custom fields, you must first create them in Shopware as follows:

1. Access **Settings** > **System** > **Custom fields**.
2. Select **Individual Offer**.
3. Click **Add New Set** and complete the fields described in the table below.
4. Click **Save**.

| **Setting**                                   | **Type**        | **Description**                                                                                                                                 |
| --------------------------------------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| Technical name                                | Free text field | Unique identifier for the custom field. It must be unique and cannot be modified once the custom field has been saved.                          |
| Position                                      | Free text field | Enter the position for the custom field (numerical value).                                                                                      |
| Manage labels in all administration languages | Toggle          | Activate this setting to allow multiple language variants for the custom field.                                                                 |
| Label                                         | Free text field | Enter the label text for the custom field. If multiple language variants setting is activated, enter the label text in each supported language. |
| Assign to                                     | Dropdown menu   | Select a category to associate the custom field with.                                                                                           |

**You can also edit existing custom fields from this page by clicking the “…” menu button and selecting Edit.**

#### Displaying custom fields in the storefront

To show custom fields in the storefront, you must implement template changes in your theme or via an extension.

For example: if you have created a text field with name **prems\_individual\_offer\_offer\_test**\
you could create a new file **resources/views/storefront/page/individual\_offer/index.html.twig** in your theme.

Insert the following code to display the custom field:

<pre><code>{% sw_extends "@Storefront/storefront/page/individual_offer/index.html.twig" %}

{% block page_account_offers_table_order_number %}
{{ parent() }}
{% if order.customFields.prems_individual_offer_offer_test is defined %}
<strong>Your label test text: {{ order.customFields.prems_individual_offer_offer_test }}
</strong>{% endif %}
{% endblock %}
</code></pre>


---

# 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/individual-offer/custom-fields.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.
