ibexa

Path

ez publish / technical manual / 3.8 / features / multi-currency / custom prices and auto prices


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

Custom prices and auto prices

The multi-price datatype allows you to set prices in multiple currencies for each product. If you use for example five currencies then a product will always have five prices. However, you don't have to enter all these prices manually although it is possible. It is required that you specify at least one price per product which is called base custom price ( base price for short). The system will automatically convert it using the appropriate rates in order to calculate prices in other currencies (the rest four prices in our example). These are called auto prices. In contrast to these, prices that are specified manually are called custom prices.

Custom prices are fully independent of the currency rates. By saying "base custom price" we mean a special custom price that is used for calculating the auto prices. All other custom prices will be called non-base. Please note that non-base custom prices are independent of the base price. If you change the base price, the system will automatically update all the auto prices for this product but not the custom prices. If you change a non-base custom price, no automatic updates will be done.

The auto prices are usually marked as "(Auto)" in the object edit interface while the custom prices aren't. There is no special mark for a base custom price because this value usually comes right after the auto prices and right before the non-base custom prices (if there are any).

If you are not satisfied with the auto price value in some particular currency, you can set a non-base custom price instead. This value will be independent of the base price.

If you remove a non-base custom price, the system will create an auto price in this currency.

If you remove the base price, the system will do the following:

  • Set the earliest non-base custom price as a new base price.
  • Remove the old base price and create a new auto price instead.
  • Update all the auto prices in accordance with the new base price.

It is recommended that each product has at least one custom price. If you remove all the custom prices for a product, the system will use zero auto prices in all currencies for this product.

Example

Let's say that you use three currencies with the rates indicated in the following table.

Currency code

Currency rate

NOK

1.32015

EUR

0.16380

USD

0.19500

If you specify for example $50 as the base price, the system will automatically calculate two auto prices for this product (look at the next screenshot).

The base price in USD and two auto prices.

The base price in USD and two auto prices.

These auto prices are calculated by converting $50 to Euro and Norwegian krone:

  • EUR/USD cross rate = 0.16380 / 0.19500 = 0.84000
  • price in EUR = 50*0.84=42.00
  • NOK/USD cross rate = 1.32015 / 0.19500 = 6.77000
  • price in NOK = 50*6.77=338.50

If you think that this product costs much more in some particular countries, for example in Norway, you can set the desired price by creating a custom price in NOK. The result is shown in the following screenshot.

The base price in USD, non-base custom price in NOK and auto price in EUR.

The base price in USD, non-base custom price in NOK and auto price in EUR.

As you can see from the screenshot above, there are two custom prices (base $50 and non-base 600nok) and one auto price (€42). Please note that you can always remove non-base custom prices, so that the system will automatically set auto prices instead.

If you remove the base price ($50), the non-base custom price (600 nok) will become new base price so the system will automatically update the auto prices as shown in the screenshot below.

The results of removing the base custom price.

The results of removing the base custom price.

These auto prices are calculated by converting 600 nok to Euro and US Dollars:

  • EUR/NOK cross rate = 0.16380 / 1.32015 = 0.12408
  • price in EUR = 600*0.12408 = 74.45
  • USD/NOK cross rate = 0.19500 /1.32015 = 0.15
  • price in NOK = 600*0.15 = 88.63

Svitlana Shatokhina (05/05/2006 11:52 am)

Svitlana Shatokhina (05/05/2006 12:26 pm)


Comments

  • is possible to set two prices in euro

    for example , book with or without hard cover