EZ Exporter Update: Multi-Currency / International Pricing Now Supported When Exporting Shopify Product Data
Shopify has recently added international pricing (multi-currency) support to the Product API and we've added support for it in EZ Exporter as well.
The International Pricing feature allows merchants to set different prices based on the the customer's payment currency. This setting can be enabled via the Shopify Admin > Settings > Payments > Shopify Payments.
From this page, you can control the exchange rate and additional price adjustments by country/currency. For example, you can set a rule so prices in CAD will be 10% higher than the shop's default currency.
On the Shopify backend, this data is stored in a single field called variants.presentment_prices
as JSON data.
The JSON data will look something like this:
As you can see, this data will be hard to read when exported to CSV or Excel. Luckily, our app can help you export this data in a more readable structure.
If you'd like to create separate columns for the different prices, you can use a formula like this under the Calculated Fields section in the Data Settings of EZ Exporter:
search_attributes({{ variants.presentment_prices }}, "EUR", search_key="price.currency_code", result_key="price.amount")
The above will pull the value of the the variant price in EUR.
Simply repeat the formula above to export the amount in other currencies, replacing the part in bold with the currency code.
The output will look something like this:
It's also possible to combine all the variant prices in different currencies in one column separated by a comma with this formlua:
", ".join([i.currency_code + ": " + i.amount for i in load_json_data(get_attribute_value({{ variants.presentment_prices }}, "price", return_raw_results=True))])
The output will look something like this:
If you prefer to place each price on a separate line in the same column, you can use this formula:
"\n".join([i.currency_code + ": " + i.amount for i in load_json_data(get_attribute_value({{ variants.presentment_prices }}, "price", return_raw_results=True))])
And the output will look something like this:
At the moment, the Shopify API only supports retrieving international prices by currency code and not by country code. So it's currently not possible to differentiate prices among different countries that use the same currency (e.g. France and Germany both use EUR).
You can learn more about Shopify's International Pricing feature here.