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

# Orders and commissions

> The AFFILUSER tags of the order data overview in the partner area: choosing a period, listing referred orders, and showing commissions.

On the order data overview `wsaffiluser_orders_deu.htm`, the partner sees which orders came about through their banners and which commission results from them. The page consists of two parts: the period selection at the top and, below it, the list of orders with the totals.

All tags on this page are only permitted there.

Guide: Running your own affiliate program

## Selecting the period

There are two ways to specify the period, and both are in the same form: a from and to date, or a predefined selection such as "this week".

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<form method="post" action="~AFFILUSER-OrdersLink~">

   von: ~AFFILUSER-OrdersSelectTimeFrom~
   bis: ~AFFILUSER-OrdersSelectTimeTo~

   oder alternativ:
   <select name="~AFFILUSER-OrdersSelectSpecial_input~">
      <option value="~AFFILUSER-OrdersSelectSpecialNoSpecial~"></option>
      <option value="~AFFILUSER-OrdersSelectSpecialToday~">Heute</option>
      <option value="~AFFILUSER-OrdersSelectSpecialYesterday~">Gestern</option>
      <option value="~AFFILUSER-OrdersSelectSpecialThisWeek~">Diese Woche</option>
      <option value="~AFFILUSER-OrdersSelectSpecialLastWeek~">Letzte Woche</option>
      <option value="~AFFILUSER-OrdersSelectSpecialThisMonth~">Diesen Monat</option>
      <option value="~AFFILUSER-OrdersSelectSpecialLastMonth~">Letzten Monat</option>
      <option value="~AFFILUSER-OrdersSelectSpecialThisYear~">Dieses Jahr</option>
   </select>

   <input type="submit" value="Anzeigen">
</form>
```

> [!NOTE]
>
> The empty entry with `AFFILUSER-OrdersSelectSpecialNoSpecial` belongs at the beginning of the list. It represents the case "no predefined period" and thus gives priority to the two dates.

| Tag | Single tag | Range tag | Negative range tag | Loop tag |
| - | - | - | - | - |
| `AFFILUSER-OrdersSelectTimeFrom` | yes | – | – | – |
| `AFFILUSER-OrdersSelectTimeTo` | yes | – | – | – |
| `AFFILUSER-OrdersSelectedFrom` | yes | – | – | – |
| `AFFILUSER-OrdersSelectedTo` | yes | – | – | – |
| `AFFILUSER-OrdersSelectSpecial_input` | yes | – | – | – |
| `AFFILUSER-OrdersSelectSpecialNoSpecial` | yes | – | – | – |
| `AFFILUSER-OrdersSelectSpecialToday` | yes | – | – | – |
| `AFFILUSER-OrdersSelectSpecialYesterday` | yes | – | – | – |
| `AFFILUSER-OrdersSelectSpecialThisWeek` | yes | – | – | – |
| `AFFILUSER-OrdersSelectSpecialLastWeek` | yes | – | – | – |
| `AFFILUSER-OrdersSelectSpecialThisMonth` | yes | – | – | – |
| `AFFILUSER-OrdersSelectSpecialLastMonth` | yes | – | – | – |
| `AFFILUSER-OrdersSelectSpecialThisYear` | yes | – | – | – |

### AFFILUSER-OrdersSelectTimeFrom

Generates three selection lists for the day, month, and year of the start date. You can style them via the assigned classes:

| Class | Applies to |
| - | - |
| `ws_affiluser_from_day` | Selection list for the day |
| `ws_affiluser_from_mon` | Selection list for the month |
| `ws_affiluser_from_year` | Selection list for the year |

### AFFILUSER-OrdersSelectTimeTo

Generates the same three selection lists for the end date, with the classes `ws_affiluser_to_day`, `ws_affiluser_to_mon`, and `ws_affiluser_to_year`.

### AFFILUSER-OrdersSelectedFrom and AFFILUSER-OrdersSelectedTo

Output the selected period so that it can be repeated above the list.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
Bestellungen von ~AFFILUSER-OrdersSelectedFrom~ bis ~AFFILUSER-OrdersSelectedTo~
```

> [!NOTE]
>
> These two tags were marked as needing revision in the old documentation. Check the output format in your shop before processing it further.

### AFFILUSER-OrdersSelectSpecial\_input

Returns the technical name of the selection list for the predefined period.

### The values of the predefined periods

Each of these tags returns the value for an `option` element of the selection list. You write the label yourself, so it can be adapted to your language.

| Tag | Period |
| - | - |
| `AFFILUSER-OrdersSelectSpecialNoSpecial` | none, the date selection applies |
| `AFFILUSER-OrdersSelectSpecialToday` | today |
| `AFFILUSER-OrdersSelectSpecialYesterday` | yesterday |
| `AFFILUSER-OrdersSelectSpecialThisWeek` | this week |
| `AFFILUSER-OrdersSelectSpecialLastWeek` | last week |
| `AFFILUSER-OrdersSelectSpecialThisMonth` | this month |
| `AFFILUSER-OrdersSelectSpecialLastMonth` | last month |
| `AFFILUSER-OrdersSelectSpecialThisYear` | this year |

## The list of orders

`AFFILUSER-OrdersData` works like `AFFILUSER-BannersData`: single tag for the count, range tag for the bracketing, loop for one iteration per order.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{!AFFILUSER-OrdersData}
   Im gewählten Zeitraum liegen keine Bestellungen vor.
{/!AFFILUSER-OrdersData}

{AFFILUSER-OrdersData}

   Anzahl Bestellungen im gewählten Zeitraum: ~AFFILUSER-OrdersData~
   Summe der Provisionen: ~AFFILUSER-OrdersSumComissions~ ~AFFILUSER-Currency~

   {AFFILUSER-OrdersPaging}~AFFILUSER-OrdersPaging~{/AFFILUSER-OrdersPaging}

   <table>
      {@AFFILUSER-OrdersData}
         <tr>
            <td>~AFFILUSER-OrdersOrderNumber~</td>
            <td>~AFFILUSER-OrdersDateTime~</td>
            <td>~AFFILUSER-OrdersSubTotal~ ~AFFILUSER-Currency~</td>
            <td>~AFFILUSER-OrdersAdjustedSubTotal~ ~AFFILUSER-Currency~</td>
            <td>
               ~AFFILUSER-OrdersFee~
               {AFFILUSER-OrdersFeeTypePercent}%{/AFFILUSER-OrdersFeeTypePercent}
               {AFFILUSER-OrdersFeeTypeFix}~AFFILUSER-Currency~{/AFFILUSER-OrdersFeeTypeFix}
            </td>
            <td>~AFFILUSER-OrdersCommision~ ~AFFILUSER-Currency~</td>
            <td>
               {AFFILUSER-OrdersPayedFee}ausgezahlt{/AFFILUSER-OrdersPayedFee}
               {!AFFILUSER-OrdersPayedFee}offen{/!AFFILUSER-OrdersPayedFee}
            </td>
         </tr>
      {/@AFFILUSER-OrdersData}
   </table>

{/AFFILUSER-OrdersData}
```

> [!NOTE]
>
> The spellings `AFFILUSER-OrdersCommision` with one `s` and `AFFILUSER-OrdersSumComissions` with one `m` are correct as written. Both tags are named with these typos in the shop and cannot be corrected without breaking existing templates.

| Tag | Single tag | Range tag | Negative range tag | Loop tag |
| - | - | - | - | - |
| `AFFILUSER-OrdersData` | yes | yes | yes | yes |
| `AFFILUSER-OrdersPaging` | yes | yes | yes | – |
| `AFFILUSER-OrdersPerPage()` | yes | – | – | – |
| `AFFILUSER-OrdersOrderNumber` | yes | yes | yes | – |
| `AFFILUSER-OrdersDateTime` | yes | yes | yes | – |
| `AFFILUSER-OrdersAffID` | yes | yes | yes | – |
| `AFFILUSER-OrdersComment` | yes | yes | yes | – |
| `AFFILUSER-OrdersSubTotal` | yes | yes | yes | – |
| `AFFILUSER-OrdersAdjustedSubTotal` | yes | yes | yes | – |
| `AFFILUSER-OrdersFee` | yes | yes | yes | – |
| `AFFILUSER-OrdersFeeType` | yes | yes | yes | – |
| `AFFILUSER-OrdersFeeTypeFix` | – | yes | yes | – |
| `AFFILUSER-OrdersFeeTypePercent` | – | yes | yes | – |
| `AFFILUSER-OrdersCommision` | yes | yes | yes | – |
| `AFFILUSER-OrdersPayedFee` | – | yes | yes | – |
| `AFFILUSER-OrdersSumComissions` | yes | – | – | – |
| `AFFILUSER-OrdersSumValueOfGoods` | yes | – | – | – |

### AFFILUSER-OrdersData

As a single tag, the number of orders in the selected period; as a range tag, the bracket around the list; as a loop, one iteration per order.

> [!NOTE]
>
> The negative range is especially important here. An empty period is the normal case, and the partner should be able to conclude from it that they should choose a different one, rather than suspecting an error.

### AFFILUSER-OrdersPaging

Generates the paging function for the order list. It uses the same classes as the paging function of the banner list, from `wsaffil_paging_table` to `wsaffil_paging_selected`.

### AFFILUSER-OrdersPerPage()

Defines how many orders are displayed per page.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
~AFFILUSER-OrdersPerPage(100)~
```

### AFFILUSER-OrdersOrderNumber

Outputs the order number.

### AFFILUSER-OrdersDateTime

Outputs the date and time of the order.

### AFFILUSER-OrdersAffID

Outputs the partner ID via which the order was attributed.

### AFFILUSER-OrdersComment

Outputs the remark on this order, for example an explanation of the commission amount.

## Amounts and commissions

### AFFILUSER-OrdersSubTotal

Outputs the goods value of the order.

### AFFILUSER-OrdersAdjustedSubTotal

Outputs the commissionable goods value. It can be lower than the goods value if individual items are excluded from the commission.

> [!NOTE]
>
> Show both values side by side. The difference is the most common reason for partner inquiries, and it is best explained by showing it.

### AFFILUSER-OrdersFee

Outputs the agreed commission. The tag does not indicate whether it is a fixed amount or a percentage; that is what the two following range tags are for.

### AFFILUSER-OrdersFeeType

Outputs the type of commission as a technical value, that is, fixed amount or percentage.

### AFFILUSER-OrdersFeeTypeFix

The range is displayed if the commission is a fixed amount.

### AFFILUSER-OrdersFeeTypePercent

The range is displayed if the commission is calculated as a percentage.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
Vereinbarte Provision: ~AFFILUSER-OrdersFee~
{AFFILUSER-OrdersFeeTypePercent}%{/AFFILUSER-OrdersFeeTypePercent}
{AFFILUSER-OrdersFeeTypeFix}~AFFILUSER-Currency~{/AFFILUSER-OrdersFeeTypeFix}
```

> [!WARNING]
>
> Without this distinction, the wrong unit appears after the value. Depending on the case, "5" then becomes 5 euros instead of 5 percent, and the partner calculates with a number that does not exist.

### AFFILUSER-OrdersCommision

Outputs the calculated commission amount for this order.

### AFFILUSER-OrdersPayedFee

The range is displayed if the commission for this order has already been paid out.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{AFFILUSER-OrdersPayedFee}Bereits ausgezahlt{/AFFILUSER-OrdersPayedFee}
{!AFFILUSER-OrdersPayedFee}Noch offen{/!AFFILUSER-OrdersPayedFee}
```

> [!NOTE]
>
> Implement this distinction as text and not just as a row color. A traffic-light color alone is not recognizable for some partners and is lost when printing.

### AFFILUSER-OrdersSumComissions

Outputs the total of commissions in the selected period.

### AFFILUSER-OrdersSumValueOfGoods

Outputs the total goods value in the selected period.

## Evaluation

| Tag | Single tag | Range tag | Negative range tag | Loop tag |
| - | - | - | - | - |
| `AFFILUSER-ConversionRate` | yes | – | – | – |
| `AFFILUSER-NumberOfClicks` | yes | – | – | – |
| `AFFILUSER-OrdersGraphicLink` | yes | – | – | – |
| `AFFILUSER-BannerStatisticLink` | yes | – | – | – |

### AFFILUSER-ConversionRate

Outputs the conversion rate in the selected period, that is, the ratio of clicks to orders.

### AFFILUSER-NumberOfClicks

Outputs the number of clicks in the selected period.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
Konversionsrate im gewählten Zeitraum: ~AFFILUSER-ConversionRate~
Anzahl der Klicks: ~AFFILUSER-NumberOfClicks~
```

### AFFILUSER-OrdersGraphicLink

Returns the address of a graphic generated by the shop showing the order trend.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{AFFILUSER-OrdersData}
   <img src="~AFFILUSER-OrdersGraphicLink~" alt="Bestellungen im gewählten Zeitraum">
{/AFFILUSER-OrdersData}
```

> [!NOTE]
>
> The bracket with `AFFILUSER-OrdersData` is part of it. Without orders, the graphic has no content.

### AFFILUSER-BannerStatisticLink

Returns the link to the banner statistics.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<a href="~AFFILUSER-BannerStatisticLink~">Zur Statistik</a>
```

## Related topics

* Guide: Running your own affiliate program
* Reference: Advertising materials
* Reference: Cross-page tags


## Related topics

- [Advertising materials](https://dokumentation.websale.de/en/v8s/referenz/tags/affiluser/werbemittel.md)
- [Cross-page tags](https://dokumentation.websale.de/en/v8s/referenz/tags/affiluser/seitenuebergreifende-tags.md)
- [Shopping basket and order process](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/shopkonfiguration-shop-config/warenkorb-und-bestellprozess.md)
- [API reference orders](https://dokumentation.websale.de/en/schnittstellen/admin-interface-api/api-referenz-bestellungen.md)
- [Scan & Order](https://dokumentation.websale.de/en/frontend/funktionsubersicht/scan-and-order.md)


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