Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Display two currencies


ahmed5

Recommended Posts

please help

 

in catalog/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');

}

 

change the EUR in what your second currency should be.

Treasurer MFC

Link to comment
Share on other sites

in catalog/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');

}

 

change the EUR in what your second currency should be.

 

it didn't work :(

 

btw, there is no catalog folder in my directory, so i changed the one in admin/includes/classes/currencies.php instead, is this wrong??

Link to comment
Share on other sites

it didn't work :(

 

btw, there is no catalog folder in my directory, so i changed the one in admin/includes/classes/currencies.php instead, is this wrong??

 

yes, includes/classes/currencies.php

Treasurer MFC

Link to comment
Share on other sites

yes .. works for me too ... but it not idisplay two currencies in checkout_confirmation.php and so later in the invoice!

 

any help please?

 

in all probability because there the format() function is called directly instead of the display_price() function.

Treasurer MFC

Link to comment
Share on other sites

  • 2 years later...
in all probability because there the format() function is called directly instead of the display_price() function.

 

 

 

Go to : includes\modules\order_total\

 

edit: ot_total.php

 

find this line: 'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']),

 

replace with this line: 'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency_value']),

 

same for: ot_shipping, ot_subtotal, ot_tax, ot_loworderfee

 

This works for me, let my know If it is Ok.

Link to comment
Share on other sites

  • 2 months later...
Go to : includes\modules\order_total\

 

edit: ot_total.php

 

find this line: 'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']),

 

replace with this line: 'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency_value']),

 

same for: ot_shipping, ot_subtotal, ot_tax, ot_loworderfee

 

This works for me, let my know If it is Ok.

 

 

After editing all modules in the order_total php all file reding error .. Please repair your code in replace line ... Who is problem in the code ? please ..

Thank you

 

Sorry no good speek englisch

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...