tdr170 Posted July 19, 2013 Share Posted July 19, 2013 As many of you know there is an issue with the Specific Price discount when using amount. It seems and actually states discount is applied after tax, the only issue is why. No where on the planet Earth do you pay tax on what you would have spent if the product were not on sale. which is what the Specific Price when using amount does, if this were how it is why does the percent not reflect the same value. On top of that it calculates completely wrong, I reported this to the Forge and was told that this is the way it is and we are not going to fix it. REALLY!!! http://forge.prestashop.com/browse/PSCFV-8996 http://forge.prestashop.com/browse/PSCFV-9358 I am finally trying to upgrade to 1.5.4.1 since the accountant gave us the go ahead to just collect State tax as the county surtax is next to impossible to enter. I would have to make 100's and 100's of tax rules for florida where as with 1.4 I could make 57 1 for each county then add the zips as a list, can be done with 1.5. anyway. Sorry to those that be I don't mean to bit-- but this is frustrating always seems like some hurdle to get over, I know nothing in life is easy but wouldn't it be nice. In my 1.4.7 online shop there was finally a solution posted to fix the tax being added to amount and it works beautifully. Now I need this for 1.5 as I have about 820 products and each had 2 specific prices I don't want to edit every one again gees. Since in the end it is up to the community to resolve this issue I am hoping some very experienced individulas (vekia) can handle this and possibly provide a solution for 1.5.4 Here is the post for the fix for 1.4 I have Played with reying to implement this to 1.5 without success. Thanks to all who give this a shot. ********************************************************************************************* This is to fix adding tax to discount price: Two changes. First one is in AdminProducts.php which is in admin/tabs folder, line 1688. Change this: return ($specificPrice['reduction_type'] == 'amount') ? ($price - $specificPrice['reduction'] / (1 + $taxRate / 100)) : ($price - Tools::ps_round($price * $specificPrice['reduction'], 2)); To this: return ($specificPrice['reduction_type'] == 'amount') ? ($price - $specificPrice['reduction'] ) : ($price - Tools::ps_round($price * $specificPrice['reduction'], 2)); Second change is in Product.php in classes folder, line 1865 Change this: $reduc = Tools::ps_round(!$use_tax ? $reduction_amount / (1 + $tax_rate / 100) : $reduction_amount, $decimals); To this: $reduc = Tools::ps_round($reduction_amount, $decimals); ******************************************************************************************8 In Theme product.js I removed, var tax = (taxRate / 100) + 1; And changed this: if (!displayPrice && !noTaxForThisProduct) { var productPrice = taxExclPrice; if (specific_price) productPriceWithoutReduction = ps_round(productPriceWithoutReduction, 2); } else { var productPrice = ps_round(taxExclPrice, 2); if (specific_price) productPriceWithoutReduction = ps_round(productPriceWithoutReduction, 2); } To this: var productPrice = ps_round(taxExclPrice, 2); if (specific_price) productPriceWithoutReduction = ps_round(productPriceWithoutReduction, 2); I also changed this: if (!noTaxForThisProduct) var productPricePretaxed = productPrice; else var productPricePretaxed = productPrice; To this: var productPricePretaxed = productPrice; Link to comment Share on other sites More sharing options...
tdr170 Posted July 22, 2013 Author Share Posted July 22, 2013 No one, not a clue out there. Link to comment Share on other sites More sharing options...
benjamin utterback Posted July 22, 2013 Share Posted July 22, 2013 Hi Tod, I found some GitHub develeoper commits regarding specific price. Maybe this can help give a little more inormation. https://github.com/PrestaShop/PrestaShop/commit/a632965b0d12b679f7c1ed7c10a8cd62a18afe85 https://github.com/PrestaShop/PrestaShop/commit/3cbd8444d69eff328b378b858855de149ea4a2bd Link to comment Share on other sites More sharing options...
tdr170 Posted July 22, 2013 Author Share Posted July 22, 2013 I actually remember this it was a different issue in that the price shown on product list was different then on product view. And applied to % discount with combinations, I checked my files and those changes already seem to apply. Such a shame Prestashop won't change fix this as once again it keeps me from upgrading. Link to comment Share on other sites More sharing options...
tdr170 Posted July 24, 2013 Author Share Posted July 24, 2013 Anyone out there ! Link to comment Share on other sites More sharing options...
Recommended Posts