Path

ezpublish / documentation / ez publish / technical manual / 4.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

This part of the 4.x documentation is for eZ Publish 4.0, only reference section is common for all eZ Publish 4.x versions as well as eZ Publish 5.x "LegacyStack", please select the version you are using for the most up to date documentation!

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

USD

1.5

EUR

1.0

GBP

1.35

If you specify for example 10€ 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 10€ to USD and British Pound:

  •  USD/EUR cross rate = 1.5 / 1 = 1.5
  •  price in USD = 10*1.5=15
  •  GBP/EUR cross rate = 1.35 / 1 = 1.35
  •  price in GBP = 10*1.35=13.5

If you think that this product costs much more in some particular countries, for example in Brazil, you can set the desired price by creating a custom price in BRL. 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 10€ and non-base 25BRL) and two auto prices (13.5GBP and 15USD). 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 (10€), the non-base custom price (25BRL) will become new base price, and the system will automatically update the auto prices.
  

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

Ricardo Correia (17/04/2013 3:03 pm)

Svitlana Shatokhina, Geir Arne Waaler, Andrea Melo, Ricardo Correia


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.