Multiple Currencies in Narrative Theme

Solved
Highlighted
Tourist
5 1 3

This should be a no brainer, I'm surprised it's not included in the Narrative theme already. I'm following this help file: https://help.shopify.com/en/themes/customization/currencies#example-currency-selectors

 

I added this just before my cart button code.

<div class="site-header__section site-header__section--button">
        {% form 'currency' %}
 	{{ form | currency_selector }}
	{% endform %}
</div>

I've added this to my theme.js file. I've tried multiple locations, even inside the doc ready function. But no go. It wont switch currencies on selection

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

There is an option to add an update button, and that actually works. But it's so clunky on mobile, even after it remove all the css styles. Since most of my traffic is mobile traffic, Id really like to get that js on change function working.

 

Help appreciated!

 

0 Likes
Highlighted
Tourist
5 1 3

This is an accepted solution.

omg nevermind.

 

I just saw that there's a custom.js file. I added the js there and it works fine.

sheesh. sorry.

 

If anyone is working on this exact thing, here's the css I added to theme.scss.liquid make it not so clunky.

.shopify-currency-form select
{-webkit-appearance: menulist; background:0; padding:0; border:0; margin:0;  width:65px;}
1 Like
Highlighted
Tourist
5 0 1

This is so awesome! Does anyone know how would I go about changing the colour of the dropdown menu? Would love to change the text to white to match our header!

 

Thank you!

 

Best,

 

Cindy

 

EDIT: got it! I just added 

.shopify-currency-form select
{-webkit-appearance: menulist; background:0; padding:0; border:0; margin:0; width:65px; color:white;}

 

and it worked

0 Likes
Highlighted
New Member
1 0 0

image.png

Hi,

Do you know any way I can change the background of the drop-down parts of the selector to be transparent? Currently, it's a white background.

0 Likes