ThemeWare® uses various custom fields to be able to use or represent category-specific or product-specific information in the storefront.
In this part of the Knowledge Base we explain all the custom fields in ThemeWare®.
Tip: Uninstalling can help if, for example, you have deleted ThemeWare® custom fields. These will be available again after a reinstallation.
Technical name:
The technical name of the ThemeWare® custom fields has a specific structure. Each custom field consists of a theme specific part and a custom field specific part.
Basic structure: {theme specific}__{custom field spefific}
The theme specific part starts with the prefix twt. This is followed by the name (e.g. modern or clean) and the edition (pro or cloud) of the theme used. The theme specific part is closed by the suffix custom_field. This structure allows individual custom fields for each theme.
Theme specific: {prefix}_{theme name}_{theme edition}_{suffix}
After the theme specific structure follows the custom field specific part. This starts with the set (e.g. category or product) to which the custom field belongs. Finally follows the actual name of the custom field (e.g. body_class).
Custom field specific: {set}__{name of the custom field}
Everything is written in lower case and separated with underscores.
Example:
twt_modern_pro_custom_field__category__body_class
{prefix}_{theme name}_{theme edition}_{suffix}__{set}__{name of the custom field}
Inheritance from the theme configuration
Many ThemeWare® custom fields of the "Selection" type offer the "inherit from theme configuration" option. This is the default option: the corresponding value is then taken from the global theme configuration.
If you instead select "no"/"yes" (or a specific value), this setting applies only to the respective category or product and overrides the theme configuration.
Note: For some features the representation option "show (via custom field)" must additionally be selected in the theme configuration for a "yes" on the custom field to take effect.
Custom field management
You can edit the custom fields used by ThemeWare® via the category or product administration.
You can also find these in the custom field management of Shopware 6. However, we strongly advise against editing this technical information. We can currently only guarantee error-free functionality if the fields are not edited.
Important: We strongly advise against editing the technical information of custom fields in the Shopware 6 custom field management and reserve the possibility to hide them there.
Your own custom fields
Always create your own custom fields in a separate custom field set, not in the ThemeWare® sets. Shopware compares the ThemeWare® custom field sets with the delivered definition on every update and removes all fields that do not belong to it. This applies to the Pro Edition as of version 5.5.0, the Cloud Edition already worked this way.
What happens during the update
As of version 5.5.0, the following applies during the update:
| Case | Result |
|---|---|
| Your own field in a ThemeWare® set | The update moves it to a separate set, e.g. "Own product fields". Name and values stay, you do not have to do anything |
The technical name starts like the ThemeWare® fields (twt_…_custom_field__) |
The field is not an official ThemeWare® field and is removed, the values are kept |
| Moving the field fails | The field is removed, the values are kept. The event logs (Settings => System => Event logs) contain an entry from ThemeWare® |
| Cloud Edition | The field is removed, the values are kept |
Note: If Shopware only removes the field definition, the saved values on products and categories are kept. They are visible again as soon as the field exists again with the same technical name and type.
Restoring a removed field
- Find out the technical name and the type of the field, e.g. from a backup, an export or your templates
- Create your own custom field set (Settings => System => Custom fields) and in it the field with the same technical name and the same type
- The saved values are visible again afterwards
Give your own fields a technical name of their own that does not start with twt_…_custom_field__ like the ThemeWare® fields.