Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Tax calculations


nstokes7989

Recommended Posts

Posted

My pricing structure has several different levels. The product is being dropped shipped out of Canada. Because of this, regardless of the price I charge I have to calculate tax based on the full retail price. I'd like to put the retail price in the "weight" field of the product. Now I need to edit the code in the general functions tax calculation.

 

Add tax to a products price

function tep_add_tax($price, $tax) {

global $currencies;

 

if ( (DISPLAY_PRICE_WITH_TAX == 'true') && ($tax > 0) ) {

return tep_round($price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']) + tep_calculate_tax($price, $tax);

} else {

return tep_round($price, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);

}

}

 

// Calculates Tax rounding the result

function tep_calculate_tax($price, $tax) {

global $currencies;

 

return tep_round($price * $tax / 100, $currencies->currencies[DEFAULT_CURRENCY]['decimal_places']);

 

 

Is anyone able to help with the modification??

  • 2 months later...
Posted

bump

 

Can anyone lend assistance on this?

 

I tried changing $price to $products_weight

that didn't work, as it is still calculating against the price somewhere

Posted
Is the drop ship charge so high that you can't add it directly to the price right away?

 

It's the tax I am trying to change

I need to calculate tax off the Products Weight field not the price.

 

I was able to edit the shipping already

but thank you

Archived

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

×
×
  • Create New...