quik solution for 1.5.x :
in the file classes/tax/Tax.php find:
public static function getProductTaxRate($id_product, $id_address = null, Context $context = null)
{
if ($context == null)
$context = Context::getContext();
$address = Address::initialize($id_address);
$id_tax_rules = (int)Product::getIdTaxRulesGroupByIdProduct($id_product, $context);
$tax_manager = TaxManagerFactory::getManager($address, $id_tax_rules);
$tax_calculator = $tax_manager->getTaxCalculator();
return $tax_calculator->getTotalRate();
}
and replace with
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;
}
Remember to save the file in override/classes/tax/Tax.php and clear cache!