cancel
Showing results for 
Search instead for 
Did you mean: 

What are Active and Base attributes used for in Currency Model

djboyd4715
Participant
0 Kudos

V2105

We have been facing an issue in which some of our b2bcustomers are getting EUR currency. We also have noticed this behavior when creating carts and placing orders via ASM.

Now we have Base Store default currency set as well as setting the sessionCurrency for all of our b2bcustomers.

When I look at the currency model, I can see that EUR is set as active and the rest of the currencies: GBP, CAD, USD, and JPY are not active. Since I want to make use of USD for our US base store and CAD for our CA store, should I make them active in the currency model, and set EUR active to false?

I have not come across much on this topic. Are there other errors in the code base that we should be looking for? I would assume that this has to be all done via configuration and not customization.

Accepted Solutions (0)

Answers (1)

Answers (1)

safin
Advisor
Advisor

Hi David,

there are two interesting attributes defined in Currency Type

  • active: this attribute is used to decide whether or not current currency can be used, if active is false, it means this currency cannot be used in your system.
  • base: this attribute is used to decide which currency will be used as base currency. Base currency is normally used to calculate transaction cost as the transaction cost for currently non-base currency is not available. For example, suppose EUR is the base currency and current order is USD based, if there is no transaction cost specified for USD, commerce will try to get transaction cost for EUR for current order, then convert it to the transaction cost for USD.

based on the above description, it is easy to conclude

  • set active to true for all currencies you will support in your system
  • set base to true for just one currency you want to use as the base currency.

hopefully it can help you a little

djboyd4715
Participant
0 Kudos

Thank you

I made the changes as suggested, but still running into issues with some of our customers. Not all of them, but there our occurrences in which EUR is displayed even though the customer has currency set.

safin
Advisor
Advisor
0 Kudos

Hi David,

My understanding is active/base attributes are just tips about how to utilize them, but it's up to the storefront developer to enforce them, unfortunately, the default storefront implementation (maybe including your storefront implementation) doesn't utilize these two attributes, so please check the code to make sure these two attributes have been efficiently utilized.

Thanks