WS-ExternInclude. Which file handles which task is defined in the wws-online-interface.config configuration in the Templates section. The tags on this page apply exclusively in these module templates.
Guide: Using the ERP info data interface · Reference: wws-online-interface.config configuration
The six templates
The “Templates” column in the tables on this page names the templates in which a tag is evaluated. “all” means that it applies everywhere.
Always wrap the interface call in
WS-OnlineERPLink or WS-OnlineERPStockLevelLink. The wrapper only takes effect if the interface is available at all, and otherwise keeps the block out of the page.The field names from the configuration
Which data fields the merchandise management system supplies differs from shop to shop. That is why the fields do not have descriptive tag names, but numbers:H1 to H1000 for the header data of an order and P1 to P1000 for the position data. You define what each number stands for in wws-online-interface.config in the HeadData and PositionData sections.
This way, you do not write the column headings of a table into the template, but retrieve them from the configuration. If the merchandise management system later changes the meaning of a field, a change in the configuration is sufficient.
The order list
ERP-HeadData is at the same time the number of orders found, the check for hits, and the loop over them.
The order type comes from the merchandise management system as a number. You define the readable text for it in
wws-online-interface.config in the Types section. If an entry is missing there, ERP-HeadData_Type_Txt remains empty. The wrapper in the example catches this and then at least shows the number.ERP-HeadData_Download and ERP-LinkDownload are two names for the same tag. Use one of them consistently within a template.The positions of an order
The position loop runs inside the order loop and always refers to the current order. The same nesting works in the list template and in the detail template, so you can copy the block from one to the other.
Filter and time period
The overview list can be restricted by the number of entries, a time period and an alternative time period. The interface provides all the selection lists required for this ready-made.ERP-MaxEntries_select, ERP-AlternativeDate_select and ERP-Search_Type_select only take effect as a wrapper if at least two entries are configured. With only one option, a list makes no sense, and the label next to it disappears along with it.The month names and the texts of the predefined time periods are located in
wws-online-interface.config in the PeriodSelection section. There, you also use ShowYearsAgo to define how far back the year list goes.The search
As a wrapper without a parameter,
ERP-Search_Type applies exactly when filtering by a type takes place at all. The value 0 means “no filter”.The comparison in
ERP-Search_Type(Wert) is numeric. A non-numeric parameter becomes 0 and thus matches the unfiltered state.Orders not yet transferred
Time passes between the order in the shop and its transfer to the merchandise management system. During this gap, the merchandise management system does not yet know the order, but the shop does. The separatePendingEntries template closes this gap.
ERP-LastShopOrderNumber is the boundary between the two worlds: everything up to this order number is in the order list, everything above it is in this list. Pointing this out saves inquiries from buyers who miss their most recent order in the overview.The stock level
ERP-RequestSent separates two states that otherwise look the same in the template: no request has been made yet because the visitor first has to select a branch, or a request was made and the answer is zero. Without this wrapper, the page incorrectly reports in the first case that the product is out of stock.General requests
In addition to orders and stock levels, the interface can supply any other data records. TheCommonRequest template displays them.
A general data record has a name and any number of values. That is why two loops are nested here: the outer one over the data records, the inner one over their values.
ERP-CommonName() expects the technical name as a fixed parameter. You therefore build the heading for each data record using a wrapper with ERP-CommonData_Name(…), as in the example. If you do not know the names, simply output ~ERP-CommonData_Name~ instead.ERP-CommonName() accepts a second parameter. {ERP-CommonName(bestand,verfuegbar)} then only applies if the configured description for bestand equals verfuegbar. This notation is not included in the old documentation.ERP-Type_Selected(Wert) compares numerically. The parameter must be a number, not text.Errors and messages
ERP-UserDependentRequest distinguishes buyer-related queries from the stock level query. In the shared error template, you can use it to show the logged-in buyer a different text than the anonymous visitor.The Type column
The “Type” column in the tables on this page has four digits. Each digit stands for a type of use;1 means permitted, 0 means not permitted.
A tag with
1111 can therefore be used in all four forms, a tag with 0110 only as a positive and negative wrapper.
Related topics
- Guide: Using the ERP info data interface
- Guide: Using external includes
- Reference: wws-online-interface.config configuration
- Reference: WS-OnlineERPLink
- Reference: WS-OnlineERPStockLevelLink
