• Welcome to KonaKart Community Forum. Please login or sign up.
 

Can languages and currencies be link to derive the correct currency code?

Started by LawrenceWebS, October 03, 2014, 08:13:58 pm

Previous topic - Next topic

LawrenceWebS

Can we link the language locale with currency code in multi-store? At the moment, currencies and languages are two separate tables. Please see example below:

Languages contains en_CA, fr_CA and en_US locale.
Currencies contains CAD (Canadian Dollar), CAF (Canadian French) and USD (US Dollar).

The goal is to
(a) store en_CA orders with currency code CAD.
(b) store fr_CA orders with currency code CAF.
(c) store en_US orders with currency code USD.

Does anyone know how can this be connected programmatically without hard coding any values by store?


julie

It's not clear to me what you are trying to achieve. The locale of the user is stored in the order so that emails and invoices can be created in the correct language. However, the currency is independent of this because it is typically the currency of the store regardless of the language chosen by the customer.

LawrenceWebS

My goal is to make sure that if the customer locale is fr_CA, the currency that gets added to the order is CAF rather than CAD. The reasoning behind this is to accommodate the province of Quebec (fr_CA). The province of Quebec Canada has a different format in currency (similar to French). It use spaces instead of comma as the thousand separator, and the dollar sign is on the right side.

i.e.
Currency:
id = 3
code = CAD
decimalPlaces = 2
decimalPoint = .
symbolLeft = $
symbolRight =
thousandsPoint = ,
title = Canadian Dollar
value = 1

id = 6
code = CAF
decimalPlaces = 2
decimalPoint = ,
symbolLeft =
symbolRight =  $
thousandsPoint = 
title = Canadian French
value = 1

julie

If you are only concerned with formatting the currency for display purposes, why don't you decide how to format it based on the customer's locale?