I have tried to do put this code into override/classes/tax/Taxes.php
public static function getProductTaxRate($id_product, $id_address = null, Context $context = null) { if ($context == null) $context = Context::getContext(); $address = Address::initialize($id_address); $groups = Customer::getGroupsStatic((int)($address->id_customer)); $taxratenew = null; foreach ($groups as $g) { if ($g > 4) { //set the group you want here ( '>;' or '=') $taxratenew = 16; //set the tax rate you want here (e.g. "0") [spam-filter] if (!$taxratenew) { $id_tax_rules = (int)Product::getIdTaxRulesGroupByIdProduct($id_product, $context); $tax_manager = TaxManagerFactory::getManager($address, $id_tax_rules); $tax_calculator = $tax_manager->getTaxCalculator(); $taxratenew = $tax_calculator->getTotalRate(); } return $taxratenew; }
However, no matter how much I clear cache I can not get it to generate order without tax for a Tax Exempt distributor. Any thoughts? Using Prestashop 1.6.0.14
Thank you,