Path

7x / documentation / ez publish / technical manual / 6.x / features / multi-currency / custom prices and auto prices


Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

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/USD

0.1739

EUR

1

USD/EUR

1.2795

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

Product Multi Price

Product Multi Price

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

  •  EUR/USD cross rate = 1 / 1.2795 = 0.7815
  •  price in EUR = 50*0.7815=39.20
  •  NOK/USD cross rate = 1 / 0.1739 = 5.76
  •  price in NOK = 50*5.75=288.45

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.
 

Setting Custom Price

Setting Custom Price


 As you can see from the screenshot above, there are two custom prices (base $50 and non-base 350nok) and one auto price (39€). 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 (350 NOK) will become new base price so the system will automatically update the auto prices.

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

Andrea Melo (15/11/2012 4:11 pm)

Geir Arne Waaler, Andrea Melo


Comments

  • is possible to set two prices in euro

    for example , book with or without hard cover
    • Re: is possible to set two prices in euro

      Why do not place two price attributes in the class? Only question is how eZ shop can handle such scenario. And other problem is to get information which price should be used. User just order book that have 2 prices- whick one should be used?
    • Re: is possible to set two prices in euro

      The multiprice datatype allows you to have prices in different currencies and that's all. If you need to have prices for different variants of the same product, try the option datatype:
      http://ez.no/doc/ez_publish/techn...anual/4_0/reference/datatypes/option
      It allows you to sell T-shirts in different colors, books with and without hard cover, etc.