I am Stuck in very weird situation where I want to remove the tax that is displayed in the cart when tax setting is set to display catalog prices including tax. I tried to remove this by setting taxclassID to 0 but didnot get any result please help me.
1 Answer
I got the following code that is used to remove any type of tax irrespective of inclusive or exclusive
$inc=$address->getGrandTotal();
$tax=$address->getTaxAmount();
$exc_tax = $address->getGrandTotal() - $address->getTaxAmount();
$address->setSubtotalInclTax($exc_tax);
$product->setPrice($exc_tax);
$product->setTaxClassId(0);
$finalPrice=$exc_tax;
I hope this will help you all