1

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?

2 Answers 2

1

How do you render the cart?

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

1

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 agree to our terms of service and acknowledge you have read our privacy policy.

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