> ## 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.

# Configuration wws-online-interface.config

> All sections of the wws-online-interface.config configuration: templates, order types, number of entries, period selection, and the header and item data that the merchandise management system supplies.

The online interface to the merchandise management system retrieves order data live from the merchandise management system and displays it in the customer account. Which data that is and how the buyer can filter it is defined in the `wws-online-interface.config` configuration.

The six sections can be read in three groups. `Templates` defines which file renders which view. `Types`, `MaxEntries`, and `PeriodSelection` build the three selection lists that the buyer uses to narrow down the display. `HeadData` and `PositionData` name the fields that the merchandise management system supplies.

> [!NOTE]
>
> Each subshop that uses the interface needs its own file in the configuration directory of that subshop, that is, in `konfiguration/<Subshop-ID>/`.

> [!WARNING]
>
> If the shop does not find the file, the module aborts and the interface returns nothing at all.
>
> As of WEBSALE V8, the shop first looks for `wws-online-interface.config` and then falls back to the older name `wws-online-interface.ini`. This fallback level is not described in the previous documentation. Use the `.config` extension for new shops.

Guide: Using the WWS info data interface · Basics: Configuration basics

## `Templates`

Defines which template renders which view of the interface. You can choose the file names freely.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<Templates>
   ListEntries    = incl_wws_list.htm
   ShowEntry      = incl_wws_detail.htm
   PendingEntries = incl_wws_pending.htm
   StockAmount    = incl_wws_stockamount.htm
   Error          = incl_wws_error.htm
</Templates>
```

| Parameter | Template for |
| - | - |
| `ListEntries` | the list of orders |
| `ShowEntry` | the detail view of a single order |
| `PendingEntries` | orders that the merchandise management system has not yet imported |
| `StockAmount` | the stock level display |
| `Error` | error messages |

These templates are pulled into a master template via `WS-ExternInclude`. The `ERP-` tags only apply within them.

Reference: ERP tags for the WWS info data interface

## `Types`

Defines the order types that the buyer can filter by. The shop builds a selection list from them.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<Types>
   Standard = 1
   onChange = submit();
   0        = Alle
   1        = in Bearbeitung
   2        = storniert
</Types>
```

| Parameter | Purpose | Values |
| - | - | - |
| `Standard` | optional. Which type is preselected | one of the defined numbers |
| `onChange` | optional. JavaScript that runs when the selection changes | for example `submit();` |
| `0`, `1`, `2`, … | the order types. The number on the left, the display text on the right | number and text |

> [!WARNING]
>
> The numbers of the order types must be coordinated with the merchandise management system. The shop passes them on unchanged and only translates them for display.

> [!NOTE]
>
> `Standard` only applies as long as the buyer has not yet selected a type. As soon as they use the selection list, their choice applies. This is not documented and is added here.

## `MaxEntries`

Defines the selection list for the number of displayed orders.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<MaxEntries>
   ActiveYearAllEntries = no
   Standard             = 20
   onChange             = submit();
   +Entry               = 0
   +Entry               = 10
   +Entry               = 20
   +Entry               = 50
</MaxEntries>
```

| Parameter | Purpose | Values |
| - | - | - |
| `+Entry` | an entry in the selection list | integer, `0` means all orders |
| `Standard` | optional. Which entry is preselected | integer. Default: `0`, meaning all |
| `onChange` | optional. JavaScript when the selection changes | for example `submit();` |
| `ActiveYearAllEntries` | show all entries of the current year as long as the buyer has not selected a period | `yes`, `no` |

`ActiveYearAllEntries = yes` is especially useful if the buyer should already see something on the first visit without having to set a period first.

> [!NOTE]
>
> As with `Types`, `Standard` only applies as long as the buyer has not used the selection list.

## `PeriodSelection`

All texts and settings for the period selection. The shop builds selection lists for day, month, and year from them, as well as a list of alternative periods.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<PeriodSelection>
   ShowYearsAgo = 1
   MonthName1   = Januar
   MonthName2   = Februar
   MonthName3   = März
   MonthName4   = April
   MonthName5   = Mai
   MonthName6   = Juni
   MonthName7   = Juli
   MonthName8   = August
   MonthName9   = September
   MonthName10  = Oktober
   MonthName11  = November
   MonthName12  = Dezember
   AltThisWeek  = Diese Woche
   AltLastWeek  = Letzte Woche
   AltThisMonth = Dieser Monat
   AltLastMonth = Letzter Monat
   AltThisYear  = Dieses Jahr
   AltLastYear  = Letztes Jahr
   AltOnchange  = submit();
</PeriodSelection>
```

| Parameter | Purpose | Values |
| - | - | - |
| `ShowYearsAgo` | how many years back the year selection goes | integer, including `0` |
| `MonthName1` to `MonthName12` | the names of the twelve months | text |
| `AltThisWeek`, `AltLastWeek` | texts for this week and last week | text |
| `AltThisMonth`, `AltLastMonth` | texts for this month and last month | text |
| `AltThisYear`, `AltLastYear` | texts for this year and last year | text |
| `AltOnchange` | optional. JavaScript when the alternative selection changes | for example `submit();` |

The oldest selectable year is the current year minus `ShowYearsAgo`. A value of `0` therefore only allows the current year.

> [!NOTE]
>
> `ShowYearsAgo` limits not only the selection list but also the validation of the dates actually submitted. A date further back is reset. A period where the end date is before the start date is swapped automatically. Neither is documented, and both are added here.

If all six `Alt` texts are empty, no alternative period selection appears.

## `HeadData`

Names the header data of an order that the merchandise management system supplies. The fields `H1` to `H1000` are supported.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<HeadData>
   H1 = Kundennummer
   H2 = Bestelldatum
   H3 = Bestelluhrzeit
   H4 = Bestellnummer
</HeadData>
```

In the template, you output the two separately.

| Tag | Outputs |
| - | - |
| `ERP-HeadName(H1)` | the field name, in the example `Kundennummer` |
| `ERP-HeadData(H1)` | the field value that the merchandise management system supplies |

> [!WARNING]
>
> The numbers cannot be assigned freely. Each number stands for a specific field of the interface. Here you only define **which** fields appear and **how** they are labeled, not which field gets which number.
>
> Coordinate with the provider of your merchandise management system which fields it actually supplies.

## `PositionData`

Names the item data of an order. The fields `P1` to `P1000` are supported. The section works exactly like `HeadData`.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<PositionData>
   P1 = Menge
   P2 = Werbemittel
   P3 = Artikelnummer
   P4 = Bezeichnung
</PositionData>
```

| Tag | Outputs |
| - | - |
| `ERP-PositionName(P1)` | the field name, in the example `Menge` |
| `ERP-PositionData(P1)` | the field value that the merchandise management system supplies |

> [!NOTE]
>
> The source documentation gave the tag `ERP-Position(H1)` for the field value. The tag name is `ERP-PositionData`, and the argument has the prefix `P`, not `H`. Both are corrected here.

## Undocumented sections

The kernel reads two further sections in this configuration that are not described in the previous documentation.

### `CommonData`

A third field section alongside `HeadData` and `PositionData`, structured according to the same pattern. It supplies the tags `ERP-CommonName`, `ERP-CommonData`, `ERP-CommonData_Name`, and `ERP-CommonData_Value`, which output general customer data from the merchandise management system.

### `Debug`

| Parameter | Purpose | Values |
| - | - | - |
| `LogCommunication` | log the communication with the merchandise management system | `yes`, `no` |

> [!WARNING]
>
> Neither section is officially documented. Only use them after consulting WEBSALE AG.
>
> `LogCommunication` records all data traffic with the merchandise management system. Keep the switch turned off in production.


## Related topics

- [Configuration types](https://dokumentation.websale.de/en/v8s/grundlagen-konfiguration/konfigurations-typen.md)
- [Configuration: fundamentals](https://dokumentation.websale.de/en/v8s/grundlagen-konfiguration/konfiguration-grundlagen.md)
- [Styles for modules and interfaces](https://dokumentation.websale.de/en/v8s/referenz/styles/module-und-schnittstellen.md)
- [Using the ERP info data interface](https://dokumentation.websale.de/en/v8s/externe-dienste/wws-infodatenschnittstelle.md)
- [ERP- (ERP info data)](https://dokumentation.websale.de/en/v8s/referenz/tags/erp-wws-infodaten.md)


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