> ## Documentation Index
> Fetch the complete documentation index at: https://dokumentation.websale.de/llms.txt
> Use this file to discover all available pages before exploring further.

# Enriching product data

> How to fill product data fields in WEBSALE V8s with test content via the global.config without the ERP system delivering them.

For test purposes, product data can be enriched independently of the ERP system. The designer then does not have to wait for the connected system to provide dedicated test products with filled fields.

Instead, the shop itself delivers an additional data field and displays it on the product detail view `ws_product.htm`. This allows features to be tested, feasibility analyses to be performed, and integrations to be prepared. A designer can thus check in advance whether a customer's requirement can even be implemented using the content of a product data field.

> [!WARNING]
>
> The ERP system's data fields take precedence. If a field contains a value in both the ERP product data and an enrichment in the configuration, the ERP system wins. The connected system therefore remains the leading system for product data.

## How it works

The test content is passed via the shop configuration `global.config`, in technical terms injected.

### Which products the content refers to

| Scope | Specification |
| - | - |
| all products | without restriction |
| a single product | via product number or product index |
| specific products | comma-separated list of product numbers or product indexes, or a pattern with the placeholders `*` and `?` for a set of similar numbers |

### Further options

* allow or exclude the enrichment per sub-shop
* pass the enrichment only in test mode

> [!WARNING]
>
> Two restrictions limit the use to test purposes:
>
> The content of the enriched field cannot be used for sorting, search, and filtering.
>
> If the field is already delivered with content by the ERP system, it is not overwritten.

## Requirements

For the enrichment to take effect, the affected product data field must be created in the WSPManager and thereby known to the shop.

In addition, the field must not yet be filled with content from the ERP system. Either it is not delivered from there at all, or it arrives empty.

The feature is activated by WEBSALE. Contact your WEBSALE representative for this.

## Integration

In the following example, the product data field `IS-ZUSATZ49` is to be filled with the value "leicht entzündlich" in all sub-shops, for all products whose product index starts with 1.

### Adding to the configuration

Add the section `<ProductDataFieldInjection>` to the `global.config`.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<ProductDataFieldInjection>
   <+InjectData>
    Allow                   = yes
    ProductPattern-List     = PI:1*
    AllowForSubShops-List   =
    DenyForSubShops-List    =
     <+SetData>
        Fieldname           = IS-ZUSATZ49
        Value               = leicht entzündlich
     </+SetData>
   </+InjectData>
</ProductDataFieldInjection>
```

The pattern `PI:1*` stands for all products whose product index starts with 1. The asterisk covers any number of additional characters.

Reference: Section ProductDataFieldInjection&#x20;

### Outputting the field in the template

Access in the template follows a fixed rule: The tag consists of the prefix `PR-` and the technical name of the field. `IS-ZUSATZ49` thus becomes `PR-IS-ZUSATZ49`.

As with all optional fields, you output it inside a bracket so that no empty line remains for products without content.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{PR-Data}
  ...
  {PR-IS-ZUSATZ49}
     Warnhinweis: ~PR-IS-ZUSATZ49~
  {/PR-IS-ZUSATZ49}
  ...
{/PR-Data}
```

Reference: PR-"technical name"&#x20;

## Related topics

* Guide: Alternative product data, when the differing data comes from the ERP system and is to be used in production
* Guide: Enabling and disabling the shop's test modes


## Related topics

- [Displaying product properties as a list](https://dokumentation.websale.de/en/v8s/produkte/produkteigenschaften-als-liste-anzeigen.md)
- [Shop configuration global.config](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/shopkonfiguration-global-config.md)
- [CBPOD- (Enriching order data)](https://dokumentation.websale.de/en/v8s/referenz/tags/cbpod.md)
- [Alternative product data](https://dokumentation.websale.de/en/v8s/produkte/alternative-produktdaten.md)
- [$wsProducts - Product data](https://dokumentation.websale.de/en/frontend/referenz/module/wsproducts.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.