multi-currency problem with Blockshop theme

Highlighted
New Member
12 0 0

Hi There, 

I am running my shop @askidz.myshopify.com

I have a problem with the multi-currency customization. apparently, i found a thead with the same issue

https://ecommerce.shopify.com/c/ecommerce-design/t/multi-currency-problem-202546

When I switch the currency on multiple product page, all prices on the same page are updated with the selected currency which is fine. Problem appears when you click on single product page, price is displayed in default currency which is HRK (Croatian Kuna) no matter what currency is chosen, and  when you try switch currency to desired one it shows wrong amount (price).

This is the script I use:

http://docs.shopify.com/manual/configuration/store-customization/currencies-and-translations/currenc...

I would be great if someone can help and solve my problem.

Cheers,
Herman

0 Likes
Highlighted
Shopify Expert
189 0 17

Hi Herman, 

Is this for http://appleseedkid.com/

Pasilobus, Inc - Shopify Experts - Contact us at support@pasilobus.com
0 Likes
Highlighted
New Member
12 0 0

Hi Ugurcan,

Yes, it is the site.

0 Likes
Highlighted
Shopify Expert
189 0 17

Herman you probably did not edit the price section on product liquid, it is lacking "money" class  You can follow this tutorial http://docs.shopify.com/manual/configuration/store-customization/currencies-and-translations/currenc...

 If you open us a staff account we can fix that for you right away, it is quite easy.

Hope this helps

 

Pasilobus, Inc - Shopify Experts - Contact us at support@pasilobus.com
0 Likes
Highlighted
New Member
12 0 0

Hi Ugurcan,

Thank you for your response, 

It would be great if you can help and fix for us. An staff account invitation email is sent to support@pasilobus.com

Cheers,
Herman

0 Likes
Highlighted
New Member
12 0 0

I tried to look into the product.liquid file. I did not know what is missing from the plug-in. Could you help or show me what to do next?

Cheers,
Herman

0 Likes
Highlighted
Shopify Expert
189 0 17

I just tried to login to your store but I guess invitation has never been made. Can you try again? 

 

 

Pasilobus, Inc - Shopify Experts - Contact us at support@pasilobus.com
0 Likes
Highlighted
New Member
12 0 0

Hi Ugurcan,

A new invite just sent to support@pasilobus.com

Cheers,

0 Likes
Highlighted
Shopify Expert
189 0 17

Theme installs currencies java script after prices are loaded so $(document).ready(function() needs to be added. Below is the updated code for currencies snippet:

 

{% if settings.show_multiple_currencies %}

{{ "//cdn.shopify.com/s/javascripts/currencies.js" | script_tag }}
{{ "jquery.currencies.min.js" | asset_url | script_tag }}

<script>
$(document).ready(function() {
{% if settings.currency_format %}
Currency.format = '{{ settings.currency_format }}';
{% endif %}

var shopCurrency = '{{ shop.currency }}';

/* Sometimes merchants change their shop currency, let's tell our JavaScript file */
Currency.moneyFormats[shopCurrency].money_with_currency_format = {{ shop.money_with_currency_format | strip_html | json }};
Currency.moneyFormats[shopCurrency].money_format = {{ shop.money_format | strip_html | json }};
  
/* Default currency */
var defaultCurrency = '{{ settings.default_currency }}' || shopCurrency;
  
/* Cookie currency */
var cookieCurrency = Currency.cookie.read();

/* Fix for customer account pages */
jQuery('span.money span.money').each(function() {
  jQuery(this).parents('span.money').removeClass('money');
});

/* Saving the current price */
jQuery('span.money').each(function() {
  jQuery(this).attr('data-currency-{{ shop.currency }}', jQuery(this).html());
});

// If there's no cookie.
if (cookieCurrency == null) {
  if (shopCurrency !== defaultCurrency) {
    Currency.convertAll(shopCurrency, defaultCurrency);
  }
  else {
    Currency.currentCurrency = defaultCurrency;
  }
}
// If the cookie value does not correspond to any value in the currency dropdown.
else if (jQuery('[name=currencies]').size() && jQuery('[name=currencies] option[value=' + cookieCurrency + ']').size() === 0) {
  Currency.currentCurrency = shopCurrency;
  Currency.cookie.write(shopCurrency);
}
else if (cookieCurrency === shopCurrency) {
  Currency.currentCurrency = shopCurrency;
}
else {
  Currency.convertAll(shopCurrency, cookieCurrency);
}

jQuery('[name=currencies]').val(Currency.currentCurrency).change(function() {
  var newCurrency = jQuery(this).val();
  Currency.convertAll(Currency.currentCurrency, newCurrency);
  jQuery('.selected-currency').text(Currency.currentCurrency);
});

var original_selectCallback = window.selectCallback;
var selectCallback = function(variant, selector) {
  original_selectCallback(variant, selector);
  Currency.convertAll(shopCurrency, jQuery('[name=currencies]').val());
  jQuery('.selected-currency').text(Currency.currentCurrency);
};

jQuery('.selected-currency').text(Currency.currentCurrency);
});
</script>

{% endif %}

 

Issue was also addressed on github: https://gist.github.com/carolineschnapp/773624

I have updated your code and  sent you an email too Herman. Let me know if you need more help

Pasilobus, Inc - Shopify Experts - Contact us at support@pasilobus.com
0 Likes
Highlighted
New Member
12 0 0

Hi Ugurcan,

Big thanks for your help, I see the problem is gone :)

0 Likes