I am building an app for Shopify. My store has EUR as the base currency and supports different currencies such as USD, NZD,.. (I refer it as active currency).
I can get active currency with the javascript window.Shopify.currency.active
and also the rate window.Shopify.currency.rate
. How can I get the base currency symbol?
4
Answers
Try
theme.moneyFormat
, it works for me:Whenever anyone changes currency, it will give current currency with symbol.
You can use
{{ currency.symbol }}
Shopify Reference
Shopify provides the Currency object depending on the theme page.
You can use
{{ cart.currency.symbol }}
and{{ checkout.currency.symbol }}
in Cart page and Checkout page respectively.For any other page, you can use the Shop object to get the currency by using
{{ shop.currency }}
.Now your "currency" is a global variant. You can use it anywhere.