HELP! Currency switcher not working properly on product page...

Solved
New Member
7 0 0

Hi,

I just went through the Shopify guide on adding a currency switcher and followed it step by step.

 

The switcher works however when I go into a product page it reverts back to the AUD price, whilst keeping the 'selected currency' as whatever was picked.

 

For example I'd like the default display currency to be USD. The home page loads in USD. All products are $34.90USD. Select any product from the home page or the collection page and it switches to $48.99AUD but the switch still shows USD. If you then go to change it, all the prices are messed up. The only way this doesn't happen is if the user changes the price to AUD, then selects the product, once it loads clicks on USD.

 

Any help will be appreciated. My store is:

https://awesomecases.store/

https://awesome-cases-store.myshopify.com

 

Ideally I'd like my payout to be AUD but my display default to be USD. If that's not possible I'll gladly have AUD and AUD with a working switcher. At the moment I've had to pause all my campaigns until this problem is resolved which sucks :(

 

Thanks in advance.

 

0 Likes

Success.

Shopify Partner
2522 25 549

Hey Joz,

this happens because the original theme code overwrites all prices on product page on load and when variant changes. And it simply outputs the numbers in your shop native currency.

 

The tutorial code includes fix for this, but it only works for old themes :(

 

What you should do is open your theme.js (liquid?) Asset look for this code at the bottom of the productPage function:

 

        this.selectors.$shopifyPaymentButton.hide();
      }
    },

and change it like this:

 

        this.selectors.$shopifyPaymentButton.hide();
      }
      Currency.convertAll(shopCurrency, jQuery('[name=currencies]').val());
      jQuery('.selected-currency').text(Currency.currentCurrency); 
    },

 

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com! My post solved your problem? This is my Paypal too :)
1 Like
New Member
7 0 0
Perfect I think this has fixed the problem, I'm going to test to see if I
can now set the default to USD and see if it works.

Thanks!!
0 Likes
Highlighted
New Member
7 0 0

Tim I've just discovered that on MOBILE only when you select the variant on a product page it opens the currency converter... what would be causing this? 

0 Likes
Shopify Partner
2522 25 549

Does not happen on my devices, can't tell without seeing.

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com! My post solved your problem? This is my Paypal too :)
0 Likes
New Member
7 0 0

Hi Tim, 

Screen grab from my phone is here https://drive.google.com/open?id=1_O01pWq6JHih4xQC4aFLSN4-uYMvzMxi the same thing occurs on all products but only on mobile, desktop there's no issue. 

0 Likes
New Member
7 0 0

Just a note I'm going to revert the code to the previous version so the store is usable for the time being... 

0 Likes
Shopify Partner
2522 25 549

Make a theme copy, add the code there and send me a preview link. I will try on an iPad tomorrow, do not have an i-device now. It is strange -- I've installed the code from/based on this tutorial on many sites and no one complained yet. 

Good night!

Want to hire me to tweak a theme? Mail me at tairli@yahoo.com! My post solved your problem? This is my Paypal too :)
0 Likes
New Member
10 0 0

Super helpful, solved my problem as well!!

0 Likes
Shopify Partner
183 0 2

I see you solved your problem. But I suggest you a currency switcher for Shopify store. It's Currency Converter Box. 

It's free at all. You can use automatic location conversion for free while other apps make you pay for it.

Sound great? This is the link to install Currency Converter Box

0 Likes