Displaying prices in two currencies?

valdo

No avatar

2007-11-03 22:09

Is there any plugin which enables QC to display prices in two currencies simultaneously?

Either with just calculating the price in second currency with fixed exchange rate, or maybe more complicated - each product and delivery option will have price in both currencies...

I'm asking because of the change from local currency (Slovak Koruna) to EURO and the law which orders all shops to display prices and provide all documents in both currencies for a period of 6 months before changing to EURO.

Thanks.

» Quick.Cart v2.x

Valdo

merci

No avatar

2007-11-05 10:26

valdo - there is no plugin, but I will try to describe how to do this...
1) Open file core/products.php in function throwProductsData() find code:

$aList['sPrice'] = changePriceFormat$aList['fPrice'] );

below this code add following:

$aList['fPrice2'] = changeCurrency$aList['fPrice'] );
            
$aList['sPrice2'] = changePriceFormat$aList['fPrice2'] );


Then in the same file but in function throwProduct() find code:

$aList['sPrice']      = changePriceFormat$aList['fPrice'] );

and also below this code paste:

$aList['fPrice2'] = changeCurrency$aList['fPrice'] );
            
$aList['sPrice2'] = changePriceFormat$aList['fPrice2'] );


*if you don't have Q.C v 2.2 add only first line in both cases.
2) in file core/other.php paste following code:

function changeCurrency$fPrice ){
  return 
$fPrice 1.2;
}

$fPrice * 1.2 - it means that normal price will be multiply, instead of 1.2 you should write there scaler for example to EUR currency. You can write script which will take automatically this scaler value from up-to-date currency rate.

3) Now you have to add this value to templates there, where you want to disply the second price. In this example I will show how to add it to the list of all products. Open file templates/products_list.tpl and in block LIST_LIST below code:

<div class="clear">&nbsp;</div>

add the following code:

<em>$lang[Price]:</em><span>$aList[sPrice2]</span>$config[curren cy_symbol2]



4) Open file for example config/lang_en.php and add in Currency section code:

$config['currency_symbol2']        = "EUR";



This solution won't work in orders part because it need much more modyfications and is hard to describe, if you need this, we can do it for you - contact with us via e-mail.

jakub89

No avatar

2008-10-30 21:16

Hello, i need manual "2 currency" for version 3.2. Thanks.

beholder

Avatar: beholder

2008-10-31 13:58

Jakub, nazdar,

You can find a complete solution (product list, product, basket, order form, order print) here, works for QC 3.x:
http://opensolution.org/Quick.Cart/forum/?p=readTopic&nr=5238

It was developped by me and I offer it for a small fee.

The free incomplete solution was just posted here by Merci, which is great, because I consider dual (triple, etc) pricing an essential part of any webshop.

QC 3.x

paulik

No avatar

2008-11-06 22:48

beholder - Do you have any demo shop with your installed plugins to try how that works?

beholder

Avatar: beholder

2008-11-06 23:42

yes, tigerware.sk of course. I'd like to keep links to my site here on minimum, since I don't want to advertise here too much.

QC 3.x

kakadu

No avatar

2008-12-30 15:24

Hello Merci I install your plugin (qc 2.2) and price displayed 1 202.1234 i need to be price displayed in format etc. 1 202.12 - only two last digits after dot. (sorry for my english).

Thank you

kakadu

beholder

Avatar: beholder

2008-12-30 16:11

for QC 2.2 edits search this forum, it should have some information on how to format the price to the desired state.

kakadu

No avatar

2008-12-30 17:15

no i mean to round the number.

beholder

Avatar: beholder

2008-12-30 18:56

in file core/other.php try following code:
function changeCurrency( $fPrice ){
return tprice($fPrice * 1.2);
}

kakadu

No avatar

2009-01-01 15:29

Thank you, now its all OK.

kakadu

reklam

Avatar: reklam

2012-07-04 11:54

Is there any solution for 5.1?

Back to top
about us | contact