In this article, we will look at all of the configurations around currency so that we don't run into any currency related errors when working with the Business Tools in Sitecore Experience Commerce and our storefront website.
Currency Configurations in the Sitecore Content Editor - Commerce Control Panel
- In the Sitecore Content Editor,
- Go to /sitecore/Commerce/Commerce Control Panel/Shared Settings/Currency Settings/Currency Sets/
- Create, edit or locate the currency set you wish to utilise
- Note the Item ID
- Go to /sitecore/Commerce/Commerce Control Panel/Storefront Settings/Storefronts/<Storefront>/Currency Configuration
- Set the Currency Set as desired
- Publish any changes made
Currency Configurations in the Commerce Engine Connect Config
- In the Sitecore configuration file, <Website Root>\App_Config\Include\Y.Commerce.Engine\Sitecore.Commerce.Engine.Connect.config, the property defaultShopCurrency may need to be updated.
Note: It's best practice to patch out this value rather than updating this configuration file directly to ensure it's deployed to each environment and that upgrades can be performed without corrupting the website.
- Create or update the patch configuration file in your website's solution with the desired currency value.
- Deploy the project/solution
Currency Configurations in BizFx
- In your BizFx solution, open \assets\config.json and review and edit the Currency value as appropriate
- Deploy the BizFx site
- Clear the Application cache in the browser if the config.json file is still being served from disk cache.
Currency Configurations in the Commerce Engine Environment Policies
- In the environment configurations, review and edit the following policy properties as appropriate:-
- GlobalEnvironmentPolicy -> Default Currency
- GlobalCurrencyPolicy -> DefaultCurrencySet (This will be the Sitecore Item ID that you noted from the Commerce Control Panel)
- GlobalPhysicalFulfillmentPolicy ->
- DefaultCartFulfillmentFees -> CurrencyCode
- DefaultCartFulfillmentFee -> CurrencyCode
- DefaultItemFulfillmentFees -> CurrencyCode
- DefaultItemFulfillmentFee -> CurrencyCode
- FulfillmentFees -> Fee -> CurrencyCode
- Deploy the Commerce Engine Solution
- Run Bootstrap
Currency Configurations in Postman Environment
- In the environment configurations set up for the project instances, review and update the Currency value as appropriate.