Ability to show currency code after price

I finally got the $ sign added, by including it in the General>Currency>Change Formatting section. I noticed the old code for a previous app was still in there. Still working on getting CAD displayed, native currency to my store.

FINALLY! Took the advice to change all 4 sections in “Change Formatting” to ${{amount}} CAD

It finally worked!

1 Like

This works @NikkaReyes07 , but if you have multiple variants, and they are set at a different price to the one that’s already selected on page load, then it will remove the currency ISO from the end once you select a different variant.

For example, lets say your product has 2 variants, blue and red. When the page loads, your product defaults to the first selection (blue) which is priced at $10 AUD. The AUD shows at the end. But now yous elect the second variant (red) that’s priced at $15 AUD. The AUD no longer shows up at the end of the price. And if you select blue again after this, the AUD is still gone. And won’t come back until the page reloads.

Any idea how to fix this, so that the currency ISO always shows up, even if the other variants are priced differently? Thanks!

which theme you talked about and showed here @Ren

1 Like

Hey @ThomasF ,
Did you end up working this out? I’ve changed the ‘money’ to ‘money_with_currency’ just about everywhere I can find it, but it disappears when a product option is selected.

Thanks!

My CAD now shows on my amounts as my default is CAD but how do I also make the second currency show the currency code. I have CAD and US. The US still shows the amount but doesn’t show the code US after amount.

I am using Debut theme.

Open Assets/theme.js, find the following code:

var formatRegularPrice = function(regularPriceElement, price) {
        regularPriceElement.innerHTML = theme.Currency.formatMoney(
          price,
          theme.moneyFormat
        );
      };

and edit it by changing: theme.moneyFormat to theme.moneyformatWithCurrency

var formatRegularPrice = function(regularPriceElement, price) {
        regularPriceElement.innerHTML = theme.Currency.formatMoney(
          price,
          theme.moneyFormatWithCurrency
        );
      };
2 Likes

Thank you, thank you!

this looks life the solution for the debut theme

In product-price.liquid assign money_price = price | money_with_currency -

Above shows the currency beside the price and below fixes the currency not being displayed with the variant change.

in theme.js

var formatRegularPrice = function(regularPriceElement, price) {
regularPriceElement.innerHTML = theme.Currency.formatMoney(
price,
theme.moneyFormatWithCurrency
);
};

Hey do you know how i’d so this using the steamline theme?
what code would i change in Assets/theme.js

i’ve asked the question here..
https://community.shopify.com/c/technical-q-a/show-currency-code-after-price-streamline-theme/m-p/2236232

but no one has been able to help.