- Posts: 20
- Thank you received: 2
Product price in two currencies
I wonder if I can enable (somehow) possibility that a product would show price in two currencies?
I did enable both currencies, I did set the price of the product for both currencies, but that product shows price in only one currency.
I'd appreciate some guidance what to do.
Best regards
Jure
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
i need to display two currencies too. My country is changing currency to Euro, ant according to law i need to display both prices now.
Please Log in or Create an account to join the conversation.
You can edit the views "checkout / cart" "product / cart" and "product / checkout" in order to duplicate price PHP lines in order to use the other price currency id to display price in both currencies.
It require PHP knwoledges. Or you can use the currency switcher module to display one or another currency, but it display not them both at one time.
Please Log in or Create an account to join the conversation.
- Posts: 13
- Thank you received: 0
Like just mentioned arnask, my country is changing currency to Euro, ant according to law I need to display both prices.
Currency switcher module don’t suits my needs, because price shows up only then customer switches it on. According to law, two prices (Litas and Euro) seller must show, either way the seller will be punish by authorities. Two currencies must show half year before Euro, and half year after Euro becomes national currency, so two currencies needed just for one year (from 2014-08-22 till 2015-07-01).
I have no php knowledge, but I can easily change files via FTP client, or “ctrl+c, ctrl+v” specified code parts. Please help on this problem, because it can cause my business seriously.
Please Log in or Create an account to join the conversation.
set main currency (that will display in the shop) in the System/Configuration, while the price for the product remains in your (old) currency. Also do not forget to enable both currencies in System/Currencies.
See my page: www.svet-el.si/english/index.php/shop/category/12-books
Let me know if this works out for you and click Thank you if it does
Please Log in or Create an account to join the conversation.
- Posts: 13
- Thank you received: 0
The thing that checkout is also important, and then I use your method there is no auto sum at the end. To have the auto sum I need to set Euro as main currency, correct all my items prices manually, then set Litas as main currency and then will be two currencies and auto sum (also appears just in one currency) in the end of checkout. But after half of year, then Euro really become our national currency, I’ll need to do everything vice versa, also manually. This method is painful.
Auto sum may be in two ways: 1. One currency, which is main in Country for the moment (till 2015-01-01 Litas, after 2015-01-01 Euro); 2. Both currencies (this way is the best).
So I still need help on this problem.
Sorry for my bad English
Please Log in or Create an account to join the conversation.
In HikaShop you have an option to "display the original price".
So if your main currency is EUR, it will display the price converted in EUR (which means that you don't have price in EUR for the product) and also the original price (so the price in Litas).
You just have to activate or deactivate this option in HikaShop.
That's all you have to do to make your switch.
I recommend you to remove the currency switcher in order to force the user to be in EUR. So the prices will always be displayed in EUR (with the original price in Litas depending the option).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- Posts: 13
- Thank you received: 0
Jerome, if I understand correctly your suggestion is the same as suggested juremm.
You mentioned "display the original price" option. I’m hanging around and can’t find such option. Maybe you mean “Show price in original currency” (I found it in Default parameters for products), this option switched on, but it can’t solve my problem. If I mismatch something, can you provide path to that option please?
I’ll try to explain again.
For next year (from 2014-08 till 2015-07) I need to display two prices in two currencies “Litas” and “Euro”.
Then I set “Euro” as main currency and leave original currency “Litas”, everything in my site is ok. I can see prices in this format: “10€ (35LTL)”.
But then I try to buy something, auto sum in checkout calculates only in Euros (see pic). Last price (for items, for shipping and for all amount) is only in one currency. But it is not suitable. According to law I must show two prices. Which one is first or last I don’t care, I just need them both.
My original price is in “Litas”, so I can’t set it as main currency, because disappears prices in euros. So I set “Euro” as main currency, and leave enabled original price, and “Litas” enabled in my currency list. If I’m understand correctly, I just need somehow to show two prices in different currencies in the end of checkout. After one year, then “Litas” in my country will be forgotten, and that law will not exist, I just swich off “Litas” in my currency list and that’s it on this case.
Please Log in or Create an account to join the conversation.
Okay, I see your problem.
Well, you will have to override some HikaShop views in order to display the price twice.
Like the view "checkout | cart" in order to display the price a second time in the old currency.
Where you see code like that
You can add some code
You have to set the variable "$latis_currency_id" with the ID of your Latis currency (or hard code it).
There are several call of this function (one for each line in the checkout cart) and several views depending what features you are using.
So you might need to override the "cart | showcart", the "order | show" too.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- Posts: 13
- Thank you received: 0
Jerome, I guess we on the right way.
But again, I can’t achieve good result. I don’t know`why, because of my mistakes or something else. First of all I can say that I don’t need to do changes anywhere else than “checkout | cart”. So if we succeed with “checkout | cart” I’ll be satisfied.
I’m not a coder but I tried to do changes. Everything I get is result on attached picture (something went wrong). Its shows old currency just in “shipping line” with no conversion. There was mistake with old currency name (it is “litas”, not “latis”), but I guess the name have no influence (I changed to correct name).
So additional help needed
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
@Tamulionyte-Krilavičienė
You have to continue the override of the view for the other elements ; I gave you the shipping line but you have to duplicate the process for the others lines (subtotal and total).
Like I said in my previous message:
There are several call of this function (one for each line in the checkout cart) and several views depending what features you are using.
Here the subtotal part:
Here the total part:
@arnask
Please follow the previous instructions in this thread.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- Posts: 13
- Thank you received: 0
I’m putting the code as you provided, but it doesn't work for me. After I insert the code, I just get following result:
- subtotal: 10€ (0.00 €);
- shipping: 1€ (0.00 €);
- total: 11€ (0.00 €).
With your code I can see second currency, but it is not Litas, and it is not with calculated rate.
I thing we just have some misunderstanding in our dialogue (because of my English
Again – I’m not a programmer (coder). I’m just advanced IT user who can “copy/paste” code, but you must understand that copypasting also can be difficult
When I’m opening “checkout / cart.php” in Joomla! CMS, the code is in plane text, so it is difficult to search and replace. So I’m just: 1. copy/paste this code to Notepade++; 2. adjusting Notepad++ for PHP language to see tags correctly; 3. replacing provided code.
But then I’m confused what I must do with your code. In your first post (there shipping code is) you posted “you can add some code” in the last post “here the (sub)total part”. So what I’m must to do with code? Just add but leave old lines, or replace with old lines?
I mentioned in the beginning of my post, that I tried to put your code, but the wrong result happened. So I can’t understand why, because of bad commands, or bad code replacement.
About php commands. If I understand correctly I need to insert second currency ID to this command "$latis_currency_id". So I inserted ID (91) from my currency list from Joomla! CMS, but it didn’t changed anything. Also my old currency not “latis” it is “LITAS”, but I doubt that the name changes anything because I tried to change it to correct.
Please pay attention to understand the problem.
Again short facts:
- I need to change just “checkout / cart.php“;
- there is no additional options in my site, and I need just basics in two currencies (subtotal, shipping and total);
- I’m attaching php file from my Notepad++, so you can see my mistakes and correct them.
- Also you can try to post clear instruction how to replace/add the code (highly appreciated with php line numbers);
The “Euro law” in my country will be valid from tomorrow, that means from tomorrow I have my business with two currencies Euro and Litas, in toher way my site will be offline for the one year.
Regards.
Please Log in or Create an account to join the conversation.
We are talking not about some feature that we need additionally. We need this according the low. Thats it. Do it and release an update please. Make hikashop legal!
Please Log in or Create an account to join the conversation.
did you check my web page: www.svet-el.si/english/index.php/shop/category/12-books
Is this suitable solution for you? I did no additional coding, that was just Hikashop setting.
Please Log in or Create an account to join the conversation.
- Posts: 13
- Thank you received: 0
No, it is not suitable for arnasK nether for me. Because it is everything is good till you proceed to checkout.
There is ok (for me) in e-shop with two currencies, but checkout proceeds only with one (it is also in your site. You have two currencies euro and dollar, but in checkout just dollar). As arnask and I mentioned few times before – it is not our freaky wish it is national law. Our country Lithuania is EU member more than decade with own currency Litas. From 2015-01-01 our currency will be Euro and according to this our government with this law demands that one year (2014-08_2015-07) all prices in all markets must be shown in two currencies.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.