Shopify's Multi-Currency Selector with Retina Theme

Solved
New Member
2 0 0

Hi folks!

I'm trying to get our store's Retina theme working with Shopify's new multiple currency options. As far as I understand, Retina's built in currency-converter won't work for this function, so I'm trying to install one of Shopify's currency selector.

 

I've been following this guide: https://help.shopify.com/en/themes/customization/currencies, using the code below to set up the form & get the JavaScript working. 

 

The form itself seems to be working totally fine, but for some reason, I cannot get the on(function) part of this working. When I try to select a new currency from the switcher, nothing changes. However, when I include Shopify's currency form with an 'update' button, it works totally fine.

 

For reference, I've put the JavaScript at the top of the "global" section of Retina's app.js.liquid - maybe that's the wrong file?

 

Any guidance would be greatly appreciated - and I hope helpful for others! Out Of The Sandbox has said they're aiming for a proper integration with the new multi-currency next year, but I'm sure I'm not alone in wanting to have that up and running sooner.

 

Thank you!

 

P.S - The current selector on our website is the one that comes with Retina - if need be I can setup a preview link with the integration I'm trying to do.

 

{% form 'currency' %}
  {{ form | currency_selector }}
{% endform %}

and

$('.shopify-currency-form select').on('change', function() {
  $(this)
    .parents('form')
    .submit();
});
0 Likes
Highlighted

Success.

Shopify Partner
184 10 19

Hi,
Can you please share site url? I think there will be issue of JS. Please try to add js code in

 $(document).ready(function() { 
//js here
});

 

If helpful then please Like and Accept Solution.
Email: suhagiyajivan1992@gmail.com
Skype: jivan.suhagiya
Give a try to Shopify APP: https://apps.shopify.com/short-track
0 Likes
Highlighted
New Member
2 0 0

Hi Jivan,

That seems to have done the trick! Thank you for the help.

0 Likes
Highlighted
Tourist
5 0 1

"submit" function doesn't seem to work. When a new currency is selected nothing happens. Had to get an update button. Once this is clicked then page reloads and new currency is show but it requires manual input and is cumbersome. How do I make it automatically submit?

0 Likes
Highlighted
Tourist
16 0 2

Thank you

0 Likes