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

# A- (Billing address)

> All tags with the prefix A- for requesting and displaying the billing address: input fields, selection lists and customer-specific values.

The tags with the prefix `A-` access the buyer's billing address. They generate the input fields on the address pages, output the entered values elsewhere and provide customer-specific values such as discounts or authorization codes.

## How the tags are formed

Every address data field of the billing address must be defined in the shop configuration `shop.config` in the `<AddressFields-Txt>` section. This applies to standard fields such as first name and last name as well as to the free address data fields (suffix fields).

The tag name always consists of two parts: the prefix `A-` and the parameter name from `<AddressFields-Txt>`.

```ini theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<AddressFields-Txt>
   ...
   FirstName = Vorname
   ...
</AddressFields-Txt>
```

The parameter name `FirstName` thus becomes `A-FirstName`, and with the suffixes described on this page, for example, `A-FirstName_text` or `A-FirstName_required`.

> [!NOTE]
>
> On this page, `Feldname` stands in for the parameter name from `<AddressFields-Txt>`. In your templates, you insert the actual name there, i.e. `A-FirstName_input` instead of `A-Feldname_input`.

Guide: Requesting the billing address · Reference: AddressFields-Txt section

## A complete input field

The suffix tags are described individually, but in practice they always appear together. The following example shows a complete input field for the first name as it appears on the billing and delivery address page in the ordering process (`ws_address_combined.htm`).

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{A-FirstName_visible}

   <label for="~A-FirstName_input~" class="~A-FirstName_error~">
      ~A-FirstName_text~{A-FirstName_required} *{/A-FirstName_required}
   </label>

   <input type="text"
          name="~A-FirstName_input~"
          id="~A-FirstName_input~"
          maxlength="~A-FirstName_max~"
          value="~A-FirstName~"
          class="~A-FirstName_error~">

   {A-FirstName_errormessage}~A-FirstName_errormessage~{/A-FirstName_errormessage}

{/A-FirstName_visible}
```

Each tag has its own task here: `A-FirstName_visible` decides whether the field appears at all, `A-FirstName_text` provides the label, `A-FirstName_input` the technical field name, `A-FirstName_max` the permitted length, `A-FirstName` the value already entered, `A-FirstName_required` the required-field asterisk, and `A-FirstName_error` as well as `A-FirstName_errormessage` handle errors.

On the order overview page (`ws_place_order.htm`), the value tag alone is then sufficient:

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<h2>Ihre Rechnungsadresse</h2>

~A-FirstName~ ~A-LastName~
~A-Street1~
~A-Zip~ ~A-City~
```

## Tags for the input field

| Tag | Single tag | Range tag | Negative range tag | Loop tag |
| - | - | - | - | - |
| `A-Feldname` | yes | yes | yes | – |
| `A-Feldname_action` | – | yes | yes | – |
| `A-Feldname_error` | yes | yes | yes | – |
| `A-Feldname_errormessage` | yes | yes | yes | – |
| `A-Feldname_hiddeninputflagdeleted` | yes | – | – | – |
| `A-Feldname_input` | yes | yes | yes | – |
| `A-Feldname_max` | yes | yes | yes | – |
| `A-Feldname_readonly` | – | yes | yes | – |
| `A-Feldname_required` | – | yes | yes | – |
| `A-Feldname_text` | yes | yes | yes | – |
| `A-Feldname_visible` | – | yes | yes | – |

These tags are permitted on the billing and delivery address page in the ordering process (`ws_address_combined.htm`) and on the billing address management page in the customer account (`ws_address_manage.htm`). `A-Feldname_hiddeninputflagdeleted` and `A-Feldname_readonly` are additionally permitted in all templates.

### A-Feldname

Outputs the value of the address data field, i.e. what the buyer has entered or what was loaded from their customer account.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<input type="text" name="~A-FirstName_input~" value="~A-FirstName~">
```

When used as a range tag, the range only applies if the field is filled. This lets you avoid empty lines in the address display:

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{A-Company}~A-Company~<br>{/A-Company}
~A-FirstName~ ~A-LastName~
```

### A-Feldname\_action

Triggers an action if a dependency is defined for the field in the `<AddressFields-Actions>` section of the `shop.config`. With input-dependent address data control, fields can be shown, hidden or renamed depending on the input. For this to take effect, the address page must be reloaded after the input, and this tag brackets exactly that call.

In the following example, the billing and delivery address input page is reloaded as soon as the buyer leaves the Company field.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<form action="~FORM-Addr~">
   ...
   <input type="text"
          name="~A-Company_input~"
          value="~A-Company~"
          {A-Company_action}onBlur="ws_AJAXRefreshAddressInput('addressform','~BT-Addr_refresh~','~WS-Charset~')"{/A-Company_action}>
   ...
</form>
```

> [!NOTE]
>
> The bracketing around the `onBlur` is the heart of the matter. Without it, every field would trigger a reload every time it is left, even where no dependency is defined at all.

Guide: Choosing between private and business address

### A-Feldname\_error

Indicates that an error occurred when checking this field. The check takes place after the submit button is clicked.

As a single tag, it outputs the string `_error` in case of an error and nothing otherwise. This allows it to be appended directly to a class name to highlight the faulty field in color.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<input type="text" name="~A-FirstName_input~" value="~A-FirstName~" class="input~A-FirstName_error~">
{A-FirstName_error}Bei der Eingabe Ihres Vornamens ist ein Fehler aufgetreten.{/A-FirstName_error}
```

In case of an error, the result is `class="input_error"`, otherwise `class="input"`.

### A-Feldname\_errormessage

Outputs the error message for an address input field. The message is defined in the `shop.config` in the `<ErrorMessages>` subsection of the `<InputCheck>` section per input field and check type.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{A-FirstName_errormessage}~A-FirstName_errormessage~{/A-FirstName_errormessage}
```

> [!NOTE]
>
> The bracketing is necessary because the single tag returns an empty string when there is no error. Without it, an empty error element would appear in the source code when there is no error.

Reference: InputCheck section

### A-Feldname\_hiddeninputflagdeleted

Provides the name for a hidden input field that explicitly marks an emptied address data field as deleted.

The background: if the buyer deletes the content of a field, the shop applies this deletion. However, empty fields passed to external systems are usually treated there as "not changed", and the old value remains. The hidden field turns the empty value into an explicit deletion instruction, which is sent along in the order data of the next order and evaluated by the external system.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<input type="hidden" name="~A-Suffix1_hiddeninputflagdeleted~" value="true">
```

> [!NOTE]
>
> The shop only evaluates the hidden field if the associated address data field is actually submitted empty. For a filled field it has no effect, so it can remain in the template permanently.

> [!WARNING]
>
> If an empty field is to be submitted but **not** marked as deleted, `value` must be empty. Any other content in `value` is treated as a deletion instruction.

### A-Feldname\_input

Outputs the technical name of the input field. It belongs in `name` and, if you work with `label`, also in `id`.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<input type="text" name="~A-FirstName_input~" value="~A-FirstName~">
```

### A-Feldname\_max

Outputs the maximum input length of the field as defined in the `<AddressMaxInputLen>` section of the `shop.config`.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<input type="text" name="~A-FirstName_input~" value="~A-FirstName~" maxlength="~A-FirstName_max~">
```

> [!NOTE]
>
> If a field is not listed in `<AddressMaxInputLen>`, a preset length applies. The tag therefore always returns a value, even without its own entry in the configuration.

### A-Feldname\_readonly

The range is displayed if the address data field is marked as "readonly", meaning the buyer may not change it. This is defined in the `<AddressFields-ReadOnly>` section of the `shop.config`.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{A-Number_readonly}
   <!-- Nicht änderbares Feld, beispielsweise die Kundennummer -->
{/A-Number_readonly}

{!A-FirstName_readonly}
   <!-- Änderbares Feld, beispielsweise der Vorname -->
{/!A-FirstName_readonly}
```

> [!WARNING]
>
> A field marked as readonly is not read in at all when the form is submitted. An input that the buyer forces via the browser therefore has no effect. Nevertheless, the field should be visibly displayed as non-editable in the template; otherwise the buyer fills in something that is silently discarded.

Reference: AddressFields-ReadOnly section · Guide: Defining customer data that the buyer cannot change

### A-Feldname\_required

The range is displayed if the address input field is a required field. Use it to mark required fields, usually with an asterisk.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
~A-FirstName_text~ {A-FirstName_required}*{/A-FirstName_required}:
<input type="text" name="~A-FirstName_input~" value="~A-FirstName~">
```

> [!NOTE]
>
> Whether a field is a required field results from the checks in the `<InputCheck>` section and is evaluated individually for each field. A hidden field is never considered a required field. The email address of the billing address, on the other hand, is always a required field, regardless of the configuration.

### A-Feldname\_text

Outputs the label of the input field, i.e. the value that follows the equals sign in the `<AddressFields-Txt>` section.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
~A-FirstName_text~:
<input type="text" name="~A-FirstName_input~" value="~A-FirstName~">
```

> [!NOTE]
>
> The label therefore belongs in the configuration and should not be hard-coded in the template: in a multilingual shop, it changes along with the language, and input-dependent address data control can change it at runtime.

### A-Feldname\_visible

The range is displayed if the field is to be visible according to the dependencies from the `<AddressFields-Actions>` section of the `shop.config`. The label and input field belong together inside this bracketing.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{A-FirstName_visible}
   ~A-FirstName_text~ {A-FirstName_required}*{/A-FirstName_required}:
   <input type="text" name="~A-FirstName_input~" value="~A-FirstName~">
{/A-FirstName_visible}
```

> [!WARNING]
>
> This tag can only be used as a range tag or negative range tag. Written as a single tag, i.e. `~A-FirstName_visible~`, it is invalid.

## Tags for selection lists

Some address data is not entered freely but selected from a list, such as the country or the salutation. The entries come from separate configuration files such as the country configuration `country.dat` or from the `shop.config`.

| Tag | Single tag | Range tag | Negative range tag | Loop tag |
| - | - | - | - | - |
| `A-Feldname_code` | yes | – | – | – |
| `A-Feldname_data` | – | – | – | yes |
| `A-Feldname_selected` | yes | – | – | – |
| `A-Feldname_value` | yes | – | – | – |
| `A-Feldname_list` (deprecated) | yes | – | – | – |

All four current tags interlock and together produce a selection list:

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
<select name="~A-Country_input~">
   {@A-Country_data}
      <option value="~A-Country_code~" ~A-Country_selected~>~A-Country_value~</option>
   {/@A-Country_data}
</select>
```

The loop `A-Country_data` runs over all entries; in each iteration `A-Country_code` provides the technical value, `A-Country_value` the label for the buyer, and `A-Country_selected` marks the entry already selected.

These tags are permitted on the billing and delivery address page in the ordering process (`ws_address_combined.htm`) and on the billing address management page in the customer account (`ws_address_manage.htm`).

### A-Feldname\_code

Outputs the technical value of a list entry, for example the three-letter ISO code in the country selection. This value belongs in the `value` of the option, because it is submitted and processed further.

### A-Feldname\_data

Loop tag over all entries of a selection list. Within the loop, `A-Feldname_code`, `A-Feldname_value` and `A-Feldname_selected` are available for the current entry.

### A-Feldname\_selected

Sets the `selected` attribute for the entry already selected. Without this tag, the selection list jumps back to the first entry after the page is reloaded or when it is called from the customer account.

### A-Feldname\_value

Outputs the label of a list entry, i.e. the text the buyer reads in the selection list.

### A-Feldname\_list

Generates a complete selection list as a finished HTML element.

> [!WARNING]
>
> **This tag will no longer be supported in the future.** Instead, build selection lists for the billing address from `A-Feldname_data`, `A-Feldname_code`, `A-Feldname_value` and `A-Feldname_selected`. This takes a few more lines in the template, but you control the markup and classes yourself.

Guide: Requesting address data as selection lists

## Other tags

These tags have a fixed name, so they are not formed from a parameter name. They provide composite or customer-specific values.

| Tag | Single tag | Range tag | Negative range tag | Permitted in |
| - | - | - | - | - |
| `A-CompleteSalutation` | yes | yes | yes | all templates |
| `A-CountryISO` | yes | – | – | all templates |
| `A-DateOfBirth_list` | yes | – | – | address pages |
| `A-ERPLastOrderDate` | yes | yes | yes | all templates |
| `A-InterCompanyCustomer` | – | yes | yes | all templates |
| `A-SalutationCode` | yes | yes | yes | all templates |
| `A-TitleCode` | yes | yes | yes | all templates |
| `A-UserDeliveryCostDiscount` | yes | yes | yes | all templates |
| `A-UserDeliveryCostFree` | – | yes | yes | all templates |
| `A-UserIndex` | yes | – | – | all templates |
| `A-UserMustChangePW` | – | yes | yes | login page |
| `A-UserPaymentCostDiscount` | yes | yes | yes | all templates |
| `A-UserPaymentCostFree` | – | yes | yes | all templates |
| `A-UserSubTotalDiscount()` | yes | yes | yes | all templates |
| `A-WarrantyList` | yes | yes | yes | all templates |

None of these tags can be used as a loop tag. "Address pages" refers to the billing and delivery address page in the ordering process (`ws_address_combined.htm`) and the billing address management page in the customer account (`ws_address_manage.htm`).

### A-CompleteSalutation

Outputs the complete salutation, for example "Sehr geehrter Herr Meier," ("Dear Mr. Meier,"). The texts for this are stored in the salutation configuration `salutation.dat` per country and gender.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{A-CompleteSalutation}
   ~A-CompleteSalutation~
{/A-CompleteSalutation}

{!A-CompleteSalutation}
   Der Kunde hat keine Anrede gewählt.
{/!A-CompleteSalutation}
```

> [!NOTE]
>
> The negative range is particularly worthwhile here. Without a salutation, a letter would otherwise begin with an empty line and a comma.

### A-CountryISO

Outputs the three-letter ISO country code of the selected billing country.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{A-Country}
   Gewähltes Rechnungsland: ~A-Country~ (Ländercode: ~A-CountryISO~)
{/A-Country}
```

> [!NOTE]
>
> The ISO code is transmitted together with the country name on submission and derived from it by the shop. For passing data to external systems, it is more reliable than the country name, which varies depending on the language.

### A-DateOfBirth\_list

Generates three selection lists for day, month and year, used to request the date of birth for the billing address.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
~A-DateOfBirth_text~: ~A-DateOfBirth_list~
```

The shop generates the three lists entirely by itself:

* The day list contains the values 01 to 31, the month list 01 to 12.
* The year list goes back 121 years, from the current year to the current year minus 121.
* Each of the three lists begins with an empty entry.
* The date of birth is only saved if day, month and year are selected. If one of them is missing, the field remains empty.

#### Styles

So that the three selection lists can be styled, the shop assigns them IDs and a shared class. You can adopt these in your styles file.

| Style | Meaning |
| - | - |
| `#ws_input_date_of_birth_day` | Selection list for the day of birth |
| `#ws_input_date_of_birth_month` | Selection list for the month of birth |
| `#ws_input_date_of_birth` | Selection list for the year of birth |
| `.select_date_of_birth` | Class assigned to all three selection lists |

> [!NOTE]
>
> The ID of the year list has no suffix; it corresponds to the field name itself. This is not an error in the documentation but the shop's naming convention. The counterpart for the delivery address is called `#ws_input_delivery_date_of_birth` and follows the same pattern.

### A-ERPLastOrderDate

Outputs the date of the last order in the format YYYY-MM-DD. The value comes from the connected merchandise management system.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{A-ERPLastOrderDate}
   ~A-ERPLastOrderDate~
{/A-ERPLastOrderDate}
```

> [!NOTE]
>
> Usually only relevant for debugging purposes. Whether the value is present and how up to date it is depends entirely on the connected merchandise management system.

### A-InterCompanyCustomer

The range is displayed if the buyer is marked as "intercompany billing", i.e. belongs to a settlement between customers or companies within a group of companies. If this flag is set, VAT is always deducted completely.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{A-InterCompanyCustomer}
   Intern verrechnen, MwSt. wird abgezogen.
{/A-InterCompanyCustomer}

{!A-InterCompanyCustomer}
   Nicht intern verrechnen, MwSt. wird grundsätzlich berechnet.
{/!A-InterCompanyCustomer}
```

> [!NOTE]
>
> The flag can only be set in the online service area, with additional authentication by entering a password. It can neither be set nor changed via the template.

Guide: VAT

### A-SalutationCode

Outputs the technical code of the salutation. The codes are stored in the salutation configuration `salutation.dat` per country and gender, in coordination with the connected ERP systems.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{A-SalutationCode}
   ~A-SalutationCode~
{/A-SalutationCode}

{!A-SalutationCode}
   Der Kunde hat keine Anrede gewählt.
{/!A-SalutationCode}
```

Reference: salutation.dat configuration

### A-TitleCode

Outputs the technical value of the title.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{A-TitleCode}
   ~A-TitleCode~
{/A-TitleCode}

{!A-TitleCode}
   Der Kunde hat keinen Titel gewählt.
{/!A-TitleCode}
```

### A-UserDeliveryCostDiscount

The range is displayed if a delivery cost discount is stored for the buyer. The single tag outputs the discount as a percentage.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{ST-LoggedIn}

   {A-UserDeliveryCostDiscount}
      Für Sie wurde ein Lieferkostenrabatt in Höhe von ~A-UserDeliveryCostDiscount~ % hinterlegt.
   {/A-UserDeliveryCostDiscount}

   {!A-UserDeliveryCostDiscount}
      Für Sie wurde kein Rabatt hinterlegt.
   {/!A-UserDeliveryCostDiscount}

{/ST-LoggedIn}
```

> [!NOTE]
>
> The outer bracketing with `ST-LoggedIn` is part of it. A customer-specific discount is only known after login, and the statement "Für Sie wurde kein Rabatt hinterlegt" ("No discount has been stored for you") would simply be wrong for a visitor who is not logged in.

Guide: Creating shipping methods, customer-specific discount and waiver for shipping costs

### A-UserDeliveryCostFree

The range is displayed if a delivery cost waiver is stored for the buyer. They then order free of shipping costs.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{ST-LoggedIn}

   {A-UserDeliveryCostFree}
      Für Sie wurde ein Lieferkostenerlass hinterlegt. Sie bestellen versandkostenfrei.
   {/A-UserDeliveryCostFree}

   {!A-UserDeliveryCostFree}
      Für Sie wurde kein Erlass hinterlegt.
   {/!A-UserDeliveryCostFree}

{/ST-LoggedIn}
```

### A-UserIndex

Outputs the user index of the logged-in buyer, i.e. their internal identifier in the shop database.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{ST-LoggedIn}
   UserIndex: ~A-UserIndex~
{/ST-LoggedIn}
```

> [!WARNING]
>
> The user index is an internal identifier and does not belong in any output visible to the buyer, nor in a URL. Use it for interfaces and troubleshooting.

### A-UserMustChangePW

The range is displayed if the buyer must change their password, for example after the forced change for new customers.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{A-UserMustChangePW}
   Bitte vergeben Sie ein neues Passwort, bevor Sie fortfahren.
{/A-UserMustChangePW}
```

> [!NOTE]
>
> This tag is only permitted on the login page (`ws_login.htm`).

Guide: Forced password change for new customers

### A-UserPaymentCostDiscount

The range is displayed if a payment cost discount is stored for the buyer. The single tag outputs the discount as a percentage.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{ST-LoggedIn}

   {A-UserPaymentCostDiscount}
      Für Sie wurde ein Zahlungskostenrabatt in Höhe von ~A-UserPaymentCostDiscount~ % hinterlegt.
   {/A-UserPaymentCostDiscount}

   {!A-UserPaymentCostDiscount}
      Für Sie wurde kein Rabatt hinterlegt.
   {/!A-UserPaymentCostDiscount}

{/ST-LoggedIn}
```

Guide: Creating payment methods, customer-specific discount and waiver for payment costs

### A-UserPaymentCostFree

The range is displayed if a payment cost waiver is stored for the buyer.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{ST-LoggedIn}

   {A-UserPaymentCostFree}
      Für Sie wurde ein Zahlungskostenerlass hinterlegt.
   {/A-UserPaymentCostFree}

   {!A-UserPaymentCostFree}
      Für Sie wurde kein Erlass hinterlegt.
   {/!A-UserPaymentCostFree}

{/ST-LoggedIn}
```

### A-UserSubTotalDiscount()

The range is displayed if the buyer has been assigned a discount on the merchandise value. The single tag outputs the discount as a percentage.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{ST-LoggedIn}

   {A-UserSubTotalDiscount}
      Für Sie wurde ein Rabatt in Höhe von ~A-UserSubTotalDiscount(2)~ % hinterlegt.
   {/A-UserSubTotalDiscount}

   {!A-UserSubTotalDiscount}
      Für Sie wurde kein Rabatt hinterlegt.
   {/!A-UserSubTotalDiscount}

{/ST-LoggedIn}
```

#### Decimal places

As a single tag, `A-UserSubTotalDiscount()` accepts a parameter for the number of decimal places. Permitted values are `2` and `0`. Without a parameter, the discount is always output without decimal places.

With a stored discount of 10 percent:

| Tag | Output |
| - | - |
| `~A-UserSubTotalDiscount~` | 10 |
| `~A-UserSubTotalDiscount(0)~` | 10 |
| `~A-UserSubTotalDiscount(2)~` | 10.00 |

#### Displaying the savings in euros

A percentage alone tells the buyer little. It becomes interesting when they can see on the product how much they save. For this, the discount rate is applied to the product price.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{A-UserSubTotalDiscount}
   {DC-CompareDigitGT($A-UserSubTotalDiscount$,0)}

      <div>Ihr Kundenrabatt: ~A-UserSubTotalDiscount~ %</div>

      <!-- Normalpreis setzen und den Rabattbetrag daraus berechnen -->
      ~DC-CommercialCalc1_set($PR-Price$)~
      ~DC-CommercialCalc1_percent($A-UserSubTotalDiscount$)~

      <!-- Rabattbetrag vom Normalpreis abziehen: der Preis für diesen Kunden -->
      ~DC-CommercialCalc2_set($PR-Price$)~
      ~DC-CommercialCalc2_sub($DC-CommercialCalc1$)~
      <div>Ihr Preis: ~DC-CommercialCalc2~ ~WS-CurrencySymbol~</div>

      <!-- Differenz zwischen Normalpreis und Kundenpreis: die Ersparnis -->
      ~DC-CommercialCalc3_set($PR-Price$)~
      ~DC-CommercialCalc3_sub($DC-CommercialCalc2$)~
      <div>Sie sparen: ~DC-CommercialCalc3~ ~WS-CurrencySymbol~</div>

   {/DC-CompareDigitGT($A-UserSubTotalDiscount$,0)}
{/A-UserSubTotalDiscount}
```

> [!NOTE]
>
> The inner check with `DC-CompareDigitGT` catches the case where a discount rate is stored but is 0. Without it, the product would show "Ihr Kundenrabatt: 0 %" and "Sie sparen: 0,00".

Guide: Defining discounts · Materials: Commercial calculations · Reference: DC-CompareDigitGT() · Reference: DC-CommercialCalc1…3\_set() · Reference: DC-CommercialCalc1…3\_percent() · Reference: WS-CurrencySymbol

### A-WarrantyList

Outputs the authorization codes stored for the logged-in customer in the customer account as a comma-separated string.

```html theme={"theme":{"light":"github-light","dark":"github-dark"},"languages":{"custom":["/languages/websale.json"]}}
{A-WarrantyList}
   Folgende Berechtigungscodes sind in Ihrem Kundenkonto hinterlegt: ~A-WarrantyList~
{/A-WarrantyList}

{!A-WarrantyList}
   In Ihrem Kundenkonto sind noch keine Berechtigungscodes hinterlegt.
{/!A-WarrantyList}
```

> [!NOTE]
>
> This tag is not suitable for showing and hiding content or controls; use `ST-Warranty()` for that. With it, you check a single authorization code specifically instead of evaluating the code list as text.

Reference: ST-Warranty()

## Related topics

* Guide: Requesting the billing address
* Guide: Requesting address data as selection lists
* Guide: Choosing between private and business address
* Reference: D- (Delivery address)


## Related topics

- [Buttons for addresses](https://dokumentation.websale.de/en/v8s/referenz/tags/bt/adressen.md)
- [D- (Delivery address)](https://dokumentation.websale.de/en/v8s/referenz/tags/d-lieferadresse.md)
- [Order process, addresses and checks](https://dokumentation.websale.de/en/v8s/referenz/tags/ws/bestellprozess-adressen-und-pruefungen.md)
- [Styles for customer and addresses](https://dokumentation.websale.de/en/v8s/referenz/styles/kunde-und-adressen.md)
- [Addresses and input checks](https://dokumentation.websale.de/en/v8s/referenz/konfigurationen/shopkonfiguration-shop-config/adressen-und-eingabepruefung.md)


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