How to place the currency picker in your theme.liquid in Shopify
![Sam Nguyen](https://cdn2.avada.io/sam-avatar.jpg)
Are you finding it challenging to add a currency picker to your theme.liquid file in Shopify? You’re not the only one. A currency picker is crucial for improving the shopping experience, especially for international customers. In this guide, we’ll walk you through the exact steps to correctly place the currency picker in your theme.liquid, allowing your customers to seamlessly switch currencies and shop comfortably. Let’s tackle this common Shopify issue together!
How to place the currency picker in your theme.liquid in Shopify
Step 1: Create currencies form
It is possible for the users to create a currency form to change the currencies on the front page. Firstly,
admins need to include the currency_selector
filter or another way to create their own currency selector is adding those codes cart.currency
and shop.enabled_currencies
.
Step 2: Add the selector code {step-2}
After creating the currencies form, the store owners have to comply those code to paste in the <head> section of the theme.liquid
layout.
For example, this is ISO code:
{% form 'currency' %}
{{ form | currency_selector }}
<button type="submit">Submit</button>
{% endform %}
or customized currency selector like this:
{% form 'currency' %}
<select name="currency">
{% for currency in shop.enabled_currencies %}
{% if currency == cart.currency %}
<option selected="true">{{currency.iso_code}}</option>
{% else %}
<option>{{currency.iso_code}}</option>
{% endif %}
{% endfor %}
</select>
<button type="submit">Submit</button>
{% endform %}
Conclusion
Now that you’ve followed these steps, placing the currency picker in your theme.liquid file in Shopify should be a breeze. By adding a currency selector, you’re enhancing the shopping experience for your customers, making it easy for them to browse and purchase in their preferred currency. Take action today to implement these changes and watch your Shopify store become more user-friendly for a global audience. Happy selling!