Jump to content

put two tax in one product


monsterstudio

Recommended Posts

Hi,

 

 

I have a product that has two rates. A is 4% and another 10%.

I'm trying to do a combination but I applied the product rate (4%), I want to apply the 10%.

 

Someone could help me?

 

I was trying to change the content.tpl, there are the tax to apply in the combinations, but I can not get either 10% applies.

 

 

<script type="text/javascript">

i18n_tax_exc = '{l s='Tax Excl.:'} ';

i18n_tax_inc = '{l s='Tax Incl.:'} ';

 

var product_tax = '{$tax_rates}';

function calcPrice(element, element_has_tax)

{

var element_price = element.val().replace(/,/g, '.');

var other_element_price = 0;

 

if (!isNaN(element_price) && element_price > 0)

{

if (element_has_tax)

other_element_price = parseFloat(element_price / ((product_tax / 100) + 1)).toFixed(6);

else

other_element_price = ps_round(parseFloat(element_price * ((product_tax / 100) + 1)), 2).toFixed(2);

}

 

$('#related_to_'+element.attr('name')).val(other_element_price);

}

 

$(document).ready(function() { $('.price_impact').each(function() { calcPrice($(this), false); }); });

</script>

 

i change product_tax by 10, but did not work well.

 

I try change {l s='Tax Excl.:'} by product price without tax and {l s='Tax Incl.:'} by product with taxa and did not work.

 

I´m sorry for my english.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...