Craft: 2.6.2976 Commerce: 1.2.1341

I want to force currency depending on language (en_us and no). The user should not be allowed to choose.

I've added two currencies 1) EUR - base, 2) NOK.

Putting define('COMMERCE_PAYMENT_CURRENCY', 'EUR'); in the index.php for the english site, and define('COMMERCE_PAYMENT_CURRENCY', 'NOK');in the index.php file for the norwegian site does not work.

The currency is always EUR.

To be clear: Using {{constant('COMMERCE_PAYMENT_CURRENCY')}} does output the correct currency as set in index.php, however the cart is what always remains in EUR (base).

Is this a bug in Commerce?

How do you render the cart?

Using {{ item.price|commerceCurrency(cart.paymentCurrency,convert=true) }} instead of {{ item.price|commerceCurrency(cart.currency) }} works for me.

Just tried setting define('COMMERCE_PAYMENT_CURRENCY', 'EUR') in the index.php file and it works fine.

You just need to use

{{ cart.paymentCurrency }}

Not

{{ cart.currency }}

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.