Open navigation

How do I enable support for multiple currencies?

Note: This guide is aimed at non-magento and non-shopify stores. For Magento, the support for multiple currencies is provided out of the box. To implement multiple currency support in Shopify, please see the link here.

When requesting product data to be sent out to us, we expect merchants to provide at least the retail and sale prices per product. These prices are expected to be provided in one currency only. However, if a store offers purchases in different currencies, the search should also show product prices in the chosen currency. On this page, we provide the necessary instructions to enable automated currency conversion.

So how does Klevu work with multiple currencies?

As mentioned earlier, Klevu only accepts prices in one currency. However, before we render prices, if the currency conversion rates and the information on the selected currency (by a shopper) is provided, it is possible for our Javascript to perform on-the-fly currency conversion.

1. Introduce a JS variable called "klevu_currentCurrencyRates" on your page with one or more currency codes and their respective conversion rates w.r.t. to the currency provided in the feed. See the example below:

<script type="text/javascript">
// comma separated values with 'currency code':'currency rate:currency symbol'
var klevu_currentCurrencyRates = {'GBP':'1:£','EUR':'1.14:€'};
</script>

2. Also declare a JS variable called "klevu_currentCurrencyCode" and ensure to provide/update the code of the selected currency in it.

<script type="text/javascript">
// comma separated values with 'currency code':'currency rate:currency symbol'
var klevu_currentCurrencyRates = {'GBP':'1:£','EUR':'1.14:€'};
var klevu_currentCurrencyCode = "EUR";
</script>

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.