endeavourco Posted May 7, 2011 Share Posted May 7, 2011 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 More sharing options...
endeavourco Posted May 9, 2011 Author Share Posted May 9, 2011 can someone please help me with this, there has to be plenty of people with this problem.thanks! Link to comment Share on other sites More sharing options...
mark2 Posted June 4, 2011 Share Posted June 4, 2011 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 More sharing options...
tomerg3 Posted June 5, 2011 Share Posted June 5, 2011 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 More sharing options...
mark2 Posted June 5, 2011 Share Posted June 5, 2011 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 More sharing options...
tomerg3 Posted June 5, 2011 Share Posted June 5, 2011 in 1.4, the tax will be added to the price after the impact was added, any tax rule you have for the product will also apply to the attribute impact. Link to comment Share on other sites More sharing options...
mark2 Posted June 5, 2011 Share Posted June 5, 2011 I think the behavior is the same in 1.2.5 Is the bug in the 1.2.5 frontend also present in 1.4 ? Or is there another explanation for the problem endeavourco is seeing ? Link to comment Share on other sites More sharing options...
tomerg3 Posted June 5, 2011 Share Posted June 5, 2011 It wasn't a bug in 1.2.5, it was just the way it was designed. Link to comment Share on other sites More sharing options...
mark2 Posted June 5, 2011 Share Posted June 5, 2011 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 More sharing options...
tomerg3 Posted June 6, 2011 Share Posted June 6, 2011 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 More sharing options...
mark2 Posted June 6, 2011 Share Posted June 6, 2011 I will try to simplify the code for you:IF noTaxForThisProduct THEN attribut_price_tmp = attribut_price_tmp ELSE attribut_price_tmp = attribut_price_tmpClearly this is a bug. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now