Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help with "VAT Price Incl and Excl" Contribution


Nomek

Recommended Posts

Hi

 

Although I do have some experience with Mysql and PHP I am fairly new to OSC.

 

I am trying to integrate "VAT Price Incl and Excl" and it says:-

In catalog/includes/classes/currencies.php

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

And replace with:

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity) . VAT_TEXT . '<br> ' . $this->format($products_price * $quantity) . ' ' . EX_VAT_TEXT;

but in my currencies.php it shows:-

return tep_round(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places']) * $quantity;

 

I have tried to fiddle with the code but the nearest I got was :-

	  return $this->format(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places'] * $quantity) . VAT_TEXT . '<br> ' . $this->format($products_price * $quantity) . ' ' . EX_VAT_TEXT;

but that only showed £0.00 for all the prices??

 

Can someone please help me with the correct format to get this working.

 

Thanks

Link to comment
Share on other sites

  • 10 months later...
Hi

 

Although I do have some experience with Mysql and PHP I am fairly new to OSC.

 

I am trying to integrate "VAT Price Incl and Excl" and it says:-

In catalog/includes/classes/currencies.php

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

And replace with:

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity) . VAT_TEXT . '<br> ' . $this->format($products_price * $quantity) . ' ' . EX_VAT_TEXT;

but in my currencies.php it shows:-

return tep_round(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places']) * $quantity;

 

I have tried to fiddle with the code but the nearest I got was :-

	  return $this->format(tep_add_tax($products_price, $products_tax), $this->currencies[$currency]['decimal_places'] * $quantity) . VAT_TEXT . '<br> ' . $this->format($products_price * $quantity) . ' ' . EX_VAT_TEXT;

but that only showed £0.00 for all the prices??

 

Can someone please help me with the correct format to get this working.

 

Thanks

 

 

Hi !

 

I've exactly the same trouble... The code in currencies.php is not the same :(

 

Is anyone for helping us to apply changes ?

 

Thank you

 

Lenny

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...