Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

force currency based on billing address?


vagranthost

Recommended Posts

Chek the currency class.

Also in application_top there is currency innitialization.Modify these codes.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

unfortunately, I'll need a bit more advanced help. :)

 

I found this code that should work for changing the currency based on category. Perhaps something similar based on Zone?

 

if ($cPath==23)

{

$currency="CAD";

}

else

{

$currency="USD";

}

Link to comment
Share on other sites

in class order in function cart.

You need to place some code

$billing_address = tep_db_fetch_array($billing_address_query);

 

after this

if $billing_address country is usa

then $currency is USD

else

 

$currency = CAD.

 

$tax_address_query = tep_db_query("select ab.entry_country_id, ab.entry_zone_id from " . TABLE_ADDRESS_BOOK . " ab left join " . TABLE_ZONES . " z on (ab.entry_zone_id = z.zone_id) where ab.customers_id = '" . (int)$customer_id . "' and ab.address_book_id = '" . (int)($this->content_type == 'virtual' ? $billto : $sendto) . "'");

$tax_address = tep_db_fetch_array($tax_address_query);

 

 

 

 

$this->info = array('order_status' => DEFAULT_ORDERS_STATUS_ID,

'currency' => $currency,

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...