Personalized checkout and custom promotions with Shopify Scripts
Based on the answers to setting currency using geolocation, I have added
<script>
if (customer.default_address.country_code === 'CA') {
$("#currencies").val("CAD");
$("#currencies").change();
}
else {
$("#currencies").val("USD");
$("#currencies").change();
}
</script>
Just before the end end tag for body in the theme.liquid file. The site is set up to force a login, so the customer object exists before getting here. However, the currency does not change as expected. What am I missing?
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024