Jump to content

Need workaround for Taxes on attributes (US sales)


Recommended Posts

I've searched until I was blue in the face trying to find a proper workaround for this problem. It adds taxes no matter where the attributes are being sold. I don't want it to add taxes! How do I stop this.

P.S. I'm running 1.4 and the default theme.

Link to comment
Share on other sites

  • 4 weeks later...

Hi, I am using v1.2.5 but we might have the same problem. In product.js replace the line :

attribut_price_tmp /= tax;

with :

attribut_price_tmp /= ((taxRate / 100) + 1);

Then the tax will be deducted from the attributes when no tax is charged to the customer.

Link to comment
Share on other sites

PS 1.4 has the option to specify the attribute impact pre tax or post tax.

The change you did for 1.2.5 will only affect the front end, when you add to the cart, it would still add it with the impact price already including tax.

Link to comment
Share on other sites

In 1.2.5 the price of the attributes is assume to include tax. So if exported to a country where the tax is not paid, then the tax is removed by Prestashop when the attribute is added to the cart.

This is done in the function getPriceStatic of Product.php, the code is :

$attribute_price = $usetax ? $result['attribute_price'] : ($result['attribute_price'] / (1 + (($tax ? $tax : $result['rate']) / 100)));

I think in 1.2.5 there was only a bug regarding the tax for attributes in the frontend, the backend is behaving correctly.

In 1.2.5 there is no way to specify attribute prices pre-tax, so 1.4 certainly offers more in that regard. Is it possible to specify different tax rates for different attributes of the same product in 1.4 ?

Link to comment
Share on other sites

Consider the original logic in product.js :

var tax = noTaxForThisProduct ? 1 : ((taxRate / 100) + 1);

if (noTaxForThisProduct)
attribut_price_tmp /= tax;

The second conditional statement serves no purpose. That is certainly a bug.

Link to comment
Share on other sites

No it's not.

If the impact price it INCLUDING tax, than if no tax is currently being collected, the tax amount is being removed from the attribute price.

While the logic to have the impact price already include the tax is flawed (at least in my mind), the code itself was correct.

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...