Migration guide - MultiCurrencyEdit on GitHub
Migrating System to Multi-Currency
This article provides a whole overview of what needs to be done to have the multi-currency feature running in your Spryker shop. The multi-currency feature affects many Spryker modules so we split it into smaller parts. Here you will find the information that will help get you started with the multi-currency feature.
There is a chance that you already have the multi-currency enabled in some of the modules. In the list below you will find versions of the modules from when it has first been implemented as well as a link to an appropriate migration guide.
composer update spryker/* to update your all modules to the latest minor version.
- Infrastructure for multi-currency:
- Store >= 1.2.*—this is a new module, require it in composer and execute
propel installfor the new databases.
- Currency >= 3.2.*—see Migration Guide - Currency for more details.
- Money >= 2.3.*—we have added a new form of money collection type, required by ZED money form inputs.
- ZedRequest >= 3.2.*—we have added a new extension point for ZED request to add additional meta data to request
\Spryker\Client\Currency\Plugin\ZedRequestMetaDataProviderPlugin, which sends currency with each ZED request.
- The Orders now includes currency iso code, which is used when order is displayed to format price. We have changed
OrderSaverand how prices are formatted for Order in Yves and Zed:
- Sales >= 8.*—see Migration Guide - Sales for more details.
- Quote >= 1.1.*—stores current currency when quote is persisted.
- Discount module has undergone big changes. Specifically, the way fixed discount calculation works has been changed. The way the amount is entered in Zed form has been changed as well (the amount requires currency now). Decision rules that MUST be built with currency/price mode decision rule include:
- Discount >= 5.*—see .
- Calculation >= 4.2.*—we have changed the way the discount amount is aggregated.
- Cart >= 4.2.*—we have added a new facade method to rebuild cart items when currency is changed. Extension point to watch for cart item rebuild.
- CartCurrencyConnector - new module provides plugin for cart rebuilding.
- ProductDiscountConnector >= 3.2.*—we have changed the way the net price is assigned.
- ProductLabelDiscountConnector >= 1.2.*—we have changed the way the net price is assigned.
- ShipmentDiscountConnector >= 1.1.*—we have changed the way the net price is assigned.
- For Shipment, we have changed the way the default price is assigned (currency-aware). Zed money input form has also been changed to accept multi-currency:
- Shipment >= 6.*—see Migration Guide - Shipment.
- ShipmentCartConnector - is a new module, which provides plugins for cart to handle cases when currency changed.
- In Products, the way the price is entered in Zed has been changed to support multi-currency, price mode as well as price type variants. We have also changed the way the collector collects prices, the way Elasticsearch exports prices, the way the results coming from Elasticsearch are formatted, the way the prices are picked in cart when item is added:
- CatalogPriceProductConnector - we have added new currency aware formatter plugins for formatting prices when reading results from Elasticsearch. See Integration guide for more details.
- Price >= 5.*—see Migration Guide - Price.
- PriceProduct - new module handling price product prices. Migration is a part of Migration Guide - Price.
- PriceCartConnector >= 4.*— Migration Guide - PriceCartConnector uses the new PriceProduct module.
- PriceDataFeed >= 0.2.*—uses the new
- ProductBundle >= 4.*—Migration Guide - ProductBundle uses the new
PriceProductmodule, the new plugin to watch cart item reload action.
- ProductLabelGui >= 2.*—see Migration Guide - ProductLabelGui.
- ProductManagement >= 0.9.*—see Migration Guide - ProductManagement. New forms and views have been added.
- ProductRelation >= 2.*—see Migration Guide - ProductRelation.
- ProductRelationCollector >= 2.*—see Migration Guide - ProductRelationCollector.
- ProductSetGui >= 2.*—see Migration Guide - ProductSetGui.
- Wishlist >= 2.*—see Migration Guide - Wishlist.
- Search >= 7.0 - see Migration Guide - Search.
- Regarding the Product Options, the way the price is entered in Zed Admin UI has been changed to support multi-currency behavior. Now Collector collects prices by store and cart checkout has been amended to support multi-currency product options.
- ProductOptionCartConnector >= 5.*—see Migration Guide - Product Option Cart Connector.
- ProductOption >= 6.*—see Migration Guide - Product Option.
Some new configuration options have been made for the whole multi-currency feature: earlier the default price type was defined in environment configuration like
$config[PriceProductConstants::DEFAULT_PRICE_TYPE] = 'DEFAULT', now it’s moved to:
\Spryker\Shared\PriceProduct\PriceProductConfig::getPriceTypeDefaultName. Please note that you might get an exception that constant is not found - you can safely remove it, unless you used it in your code. In this case replace
\Spryker\Client\PriceProduct\PriceProductClient::getPriceTypeDefaultName accordingly. Default price mode is defined in
\Spryker\Shared\Price\PriceConfig::getDefaultPriceMode. Default currency is defined based on
config/Shared/stores.php, array key
currencyIsoCodes will be the first item in the list.
For submitting the form