ibexa

Path

ez publish / technical manual / 3.9 / features / multi-currency / upgrading your webshop


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

Upgrading your webshop

If you have just upgraded your eZ publish installation in order to start using multiple currencies, you will need to create currencies and convert all your products to multi-price format using the "convertprice2multiprice.php" script located in the "bin/php/" directory. Please note that you should launch this script from the root of your eZ publish installation.

The script will go through all classes and objects containing an attribute of the price datatype and create an attribute of the multi-price datatype instead without changing the identifiers of the attributes, objects and classes. This means that your overrides will still be applied to converted objects (please refer to the "Templates for viewing multiple products" section if you wish to display only price in the preferred currency to a customer).

It is recommended to create all the currencies (including your locale currency) and check their exchange rates before launching the script.

Example

If your locale currency is USD, one of your simple price products costs for example $100 and you wish to start using the multi-currency feature, you can create for example the following three currencies:

Currency code

Currency rate

EUR

1

NOK

7.9675

USD

1.2104

These rates can be for example auto rates retrieved from the website of the European central bank.

After successful execution of the "convertprice2multiprice.php" script the product with $100 simple price will be automatically converted to a multi-price product with one custom price (base price) and two auto prices as shown in the following screenshot.

The resulting prices after product upgrading.

The resulting prices after product upgrading.

As you can see, the script converts the base price from USD to EUR and NOK using the existing currency exchange rates.

If you have forgotten to create your locale currency, the script will automatically create it with custom rate set to 1. The table of currencies will then look like this:

Currency code

Currency rate

EUR

1

NOK

7.9675

USD

1

These rates are incorrect (1 USD does not cost 1 EUR). The auto prices for all converted products will be also incorrect since generated according to incorrect currency rates.

Svitlana Shatokhina (05/05/2006 1:28 pm)

Svitlana Shatokhina (10/05/2006 8:18 am)


Comments

There are no comments.