cm_w89 Posted June 26, 2017 Share Posted June 26, 2017 Hi, I'm using PrestaShop 1.6.1.0. I have applied a specific price discount on a product. But when it comes to adding tax. It's being added on the base price not on discounted price.What should I do?Code in my Classes/Product.php: $specific_price_reduction = 0; if (($only_reduc || $use_reduc) && $specific_price) { if ($specific_price['reduction_type'] == 'amount') { $reduction_amount = $specific_price['reduction']; if (!$specific_price['id_currency']) $reduction_amount = Tools::convertPrice($reduction_amount, $id_currency); $specific_price_reduction = $reduction_amount; // Adjust taxes if required if (!$use_tax && $specific_price['reduction_tax']) $specific_price_reduction = $product_tax_calculator->removeTaxes($specific_price_reduction); if ($use_tax && !$specific_price['reduction_tax']) $specific_price_reduction = $product_tax_calculator->addTaxes($specific_price_reduction); } else $specific_price_reduction = $price * $specific_price['reduction']; } 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