I would like to pass a custom variable into notification templates. We sell in various markets and would like to show the exchange rate between the buyer’s locale and the store’s default currency at time of purchase in order confirmations.
Is there a way to get this exchange rate variable into a notification template? Also, can we display the buyer’s local currency in this template?
If you’re using Shopify Payments and the customer pays in their local currency, then the order in the notification will reflect that.
However, if the order is processed in your store’s default currency (for example, when using a third-party payment gateway), the email will display only that store’s currency.
Showing the exchange rate: Shopify does record the exchange rate internally (you can see it in the order timeline in admin), but it’s not available as a Liquid variable. So you can’t display the exchange rate in notification templates.
Adding custom variables: Shopify notification templates only support a fixed set of objects, like order, customer, and line items. You can’t pass custom variables into them from outside.