Link Currency Display to Selected Language

  • Posts: 109
  • Thank you received: 5
10 years 10 months ago #175760

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.6

Hello, there.

Good morning!

I am using Falang to translation.

Please could you let me know how to display the prices (in the product pages, carts, etc.) in the currency of the selected language? The main product price is in USD.

For instance, say a product costs 1 USD, when the user selects:
a) en-US as language, the price will be displayed as "1 USD"
b) ja-JP as language, the price will be displayed as "1 USD (¥105.885)
c) ko-KR as language, the price will be displayed as "1 USD (₩1059.675)

The en-US, ja-JP and ko-KR will be the only 3 languages that the user can select from.

Thanks.

Take care!

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
10 years 10 months ago #175780

Hi,

The geolocation plugin allow to change the currency based on the user location.
To do what you need, it will require the development of a new plugin, which will check the current language and change the default currency based on this setting.

So it require PHP knowledges, you can see how the hikashopgeolocation plugin works to made the other one.

Please Log in or Create an account to join the conversation.

  • Posts: 109
  • Thank you received: 5
10 years 10 months ago #178903

Hello, Xavier.

Good afternoon!

Thanks for the explanation. Your point about using the geolocation plugin makes more sense that what I had written; i.e. to allow Hikashop change the currency based on the user location (rather than on the selected language).

I have a couple of questions/confirmation regarding the geolocation plugin which I will greatly appreciate your answers to:

a) Display Format of Prices
By enabling the geolocation plugin, if the unit price of a product is specified as USD100.00 and the user is in Japan,
will the price be displayed as USD100.00 (JPY114.25); i.e. in the format of "USDxxx.xx (JPYzzz.zz)?

If not, how can I configure/customise Hikashop to achieve this? From what I have seen, I think the price will be in the format of JPYzzz.zz (USDxxx.xx) instead. Please let me know which files to change the code for.

b) Payment Price
By enabling the geolocation plugin, will the payment price (i.e. the total price of the value of the cart that the user has to pay) be specified in the local currency or in the specified currency for the product?

For example, product A is USD80.00 and product B is USD20.00. The user orders 1 unit of Product A and 1 unit of Product B and hence, the total value of the cart is USD100.00. The user is in Japan, hence the cart value in Japanese Yen is JPY114.25.

Will the user pay in the local currency (i.e. JPY 114.25) or the currency that is specified in the product (i.e. USD100.00)? Or is the payment price set in the Main Currency in Hikashop's Main Configuration?

The requirement I have is for the user pay in USD (and the prices displayed in USDxxx.xx (JPYyyy.yy) for user in Japan).

c) Testing the Geolocation Plugin
Will you be able to suggest how I can test a) and b) above? I.e. even if I enable the geolocation plugin, since I am accessing the site in the "home country", I will not be able to see the localised (e.g. Japanese) display and payment price functionality. How will I be able to "trick" the system so that I can test these?

Thanks very much for your help.

Take care!

Please Log in or Create an account to join the conversation.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 10 months ago #179236

Hi,

a) You can configure how the prices are displaying by configuring the currencies.

b) the geolocation plugin change the used currency of the store ; like with the currency switcher module.

c) Like in point B, the geolocation plugin act like the currency switcher but the difference is that the plugin is automatic.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.070 seconds
Powered by Kunena Forum