Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to display two currencies in product info and product listing


Guest

Recommended Posts

Posted

hi,

 

i have to display two prices (Slovenian tolars and Euros) due to the law. i tried to do it with new variable:

$products_price_eur = $product_info['products_price'] / 239; 239 goes to exchange rate.

 

it does ok but there is a problem how to display it like it should be:

 

e.g. price in slovenian tolars: 48.000 SIT

price in euro: 200,00 ?

 

i have installed two currencies also, one is slovenian tolar and other one is euro. slovenian tolar is default currency. can i call the other currency to display?

 

please help, i need it. thanks in advance

Posted

or even better solution - is it possible to display both currencies everywhere?

Posted

in includes/classes/currencies.php:

 

change this code :

 

function display_price($products_price, $products_tax, $quantity = 1) {

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);

}

 

 

to this code:

 

function display_price($products_price, $products_tax, $quantity = 1) {

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity).'/'.

$this->format(tep_add_tax($products_price, $products_tax) * $quantity,true,'EUR');

}

 

In dela! :)

  • 2 months later...
Posted

halo

 

?e moj problem.

 

Kaj moram narediti, da bo mi v akcijah pravilno priikazal "staro" ceno, saj mi seda prika?e ceno brez DDV, namesto z - zato je akcijska cena vi?ja, od stare - to ni ql...

 

www.abacus.si - konkretno...

 

prosim za pomoč

 

tnx

Posted

Ok, sem ?e na?el. Ceno moram vnesti brez DDV. Je mo?no, da bi vnesel z DDVjem? Se pravi končno ceno?

 

Lp

  • 1 month later...
Posted

zdravo.

 

Mam eno pro?njo. Kaj moram spremeniti, da bomo cene prikazane ne v obliki:

xxx.xx SIT / X.X ?

ampak:

xxx.xx SIT

x.x ?

 

Da bi bile v dveh vrsticah?

 

Lp

Posted
Does anyone know the code to add additional currencies just in the product info page.. and not with the main page but below the description somewhere..

like 'approx. EUR 25, $40'

 

like used on firebox.com http://www.firebox.com/index.html?dir=fire...1&src_t=hmf

 

use this function in the currency class, clone it and set the rounding to 1 decimal to get nice appx prices.

function format($number, $calculate_currency_value = true, $currency_type = '', $currency_value = '') {

 

call the new function for each value separately, specifying the currency needed

number is the price you get from the database

:-)

Monika

 

addicted to writing code ... can't get enough of databases either, LOL!

 

my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum

 

Interactive Media Award July 2007 ~ category E-Commerce

my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...

Posted

Samo v tej kodi bi bilo potrebno nekje vstaviti < br >, da bi se izpisalo v dveh vrsticah - a če spremenim, mi trgovina ne dela več. Se pravi, da bi samo v teh php kodi popravili, da bi se namesto / izvedel prelom vrstice.

 

Lp

 

 

in includes/classes/currencies.php:

 

change this code :

 

function display_price($products_price, $products_tax, $quantity = 1) {

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);

}

to this code:

 

function display_price($products_price, $products_tax, $quantity = 1) {

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity).'/'.

$this->format(tep_add_tax($products_price, $products_tax) * $quantity,true,'EUR');

}

 

In dela! :)

Posted

?e re?il. Namesto '/' sen spremenil v '<br>' pa mi lepo prelomi cene. Sedaj pa ?e me samo zanima, kako bi lahko vstavil presledek v ceno - izpi?e mi xxx,xxSIT jaz bi pa imel xxx,xx SIT (da je presledek med ?tevilko in oznako valute).

 

Lp

 

Samo v tej kodi bi bilo potrebno nekje vstaviti < br >, da bi se izpisalo v dveh vrsticah - a če spremenim, mi trgovina ne dela več. Se pravi, da bi samo v teh php kodi popravili, da bi se namesto / izvedel prelom vrstice.

 

Lp

  • 5 months later...
Posted

Hello.

 

The year is over and we need to display the two currencies in reverse order. What's the best way to do it? From 1.1.07 our currencie is EUR but we still have to display the price in SIT. 1€ is 239,64 SIT. How to do this? I set the default currencie to EUR. But it doesn't change it.... Vhy?

 

Please help

Posted

I changed the currencies in the code mentioned above, but i have the problem now, that if i want to change the price for an article the price in background is still in SIT not in EUR. I changed the default currencie to EUT, but it doesn't help... What do I have to change?

 

tnx

Posted

me again...

 

I managed now the currencies problem so, that i changed the default currencie to EUR and I changed the default currencie in language.php to EUR. It works great now - if this helps to somebody. But I can't manage to get the administration currencie to EUR. So if I want to change the price for a product it is displayed in SIT not in EUR... How to change this? Where is this set?

 

papa

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...