Skip to main content
WEBSALE V8s supports country-dependent price formatting, for example the country-dependent display of prices with a comma or period as the decimal separator. In addition, you can define the display of prices individually. Examples:
Preis Formatierung

Country-dependent price formatting

The settings are defined in the shop configuration shop.config in the <PriceFormat> section and can be changed there. It is important to note that this only concerns the display of prices. The internal calculation of numbers is performed with higher precision, and for the transfer of numbers, the international technical format is retained. There, only one decimal separator is used, namely the period. Example: We have a Swedish shop and the display of the price should be as follows: 1.234:99
Reference: Section PriceFormat

Formatting integer and decimal parts

Optionally, you can format the integer and decimal parts of price information differently in shape, size, and color. For this purpose, you can position the integer and decimal parts separately. Example: You want to superscript the decimal part of the product price. To do so via styles, you must position the integer and decimal parts separately with tags on the template.
Reference: PR-FPart() Reference: PR-IPart() Reference: BD-FPart() Reference: BD-IPart()

Replacement character for zero

Optionally, you can also define a replacement character that is displayed when the integer or decimal part is 0. Examples:
  • Instead of 3.00 EUR, you can display 3.— EUR or 3 EUR.
  • Instead of 0.50 EUR, you can display .50 EUR.

Step 1: Defining the replacement characters in the shop configuration

You define the replacement characters in your shop configuration shop.config in the <PriceFormat> section via the ZeroIntegralPart and ZeroFractionalPart parameters. Example: Instead of 3.00, 3.— should be displayed. Therefore we enter the value -- after the ZeroFractionalPart parameter. Instead of 0.50, -.50 should be displayed. Therefore we enter the value - after the ZeroIntegralPart parameter.

Step 2: Adjusting the price tags on the templates

The display of a replacement character only works if the tags PR-FPart(), BD-FPart(), PR-IPart(), or BD-IPart() are used for the representation and display of the prices. So if you want to have the product price PR-Price displayed with a replacement character in the case of a zero, replace the tag PR-Price on all templates as follows:
If you want to use prices without formatting on a template, for example as a tag parameter or for transfer to technical systems, you can temporarily disable the formatting. How to do this is described in the section Disabling price formatting in specific places.

Transferring prices to technical interfaces

All technical interfaces to ERP systems, clearing systems, tracking systems, and affiliate systems that have not been manually integrated are not affected by the formatting. These systems are provided with an internationally valid technical format for prices. Also unaffected are the weight and volume of the product, the weight and volume of the order, VAT and discount rates, order quantities, and other numbers displayed in the shop. Pointer: Transferring prices to external systems

Disabling price formatting in specific places

Once you have opted for a price formatting, this formatting is used throughout the shop for displaying prices. In some places, however, it is necessary to display prices without formatting, for example as a tag parameter or for transfer to technical systems. In this case, you can disable the formatting with the tag WS-DisablePriceAndNumberFormat in that specific place and then re-enable it with the tag WS-EnablePriceAndNumberFormat. Example: Using the comparison tag DC-CompareDigitGT(), an area should be displayed on the single product view if the product price is greater than 99.99 euros. A comma is defined as the decimal separator. However, for the logical comparison this would mean that the price stored in the PR-Price tag would be interpreted as 99, because every technical system expects a period as the decimal separator. The area would therefore be displayed for every price above 99 euros. To prevent this, the price formatting must be deactivated for this area:
The technical interfaces are not affected by the formatting anyway, see the section Transferring prices to technical interfaces.
Reference: WS-DisablePriceAndNumberFormat Reference: WS-EnablePriceAndNumberFormat Reference: DC-CompareDigitGT()