Jump to content

Free gift adds tax


Recommended Posts

When I add a cart rule for a free gift, Cart.php calculates the cart total using the original price of the free gift WITH TAX, then subtracts the free gift price WITHOUT TAX. This leaves the cart total off by the amount of tax on the free gift.

 

I narrowed down where to deal with this, but I still can't figure out how to check if a cart product is a free gift. In Cart.php function getOrderTotal() line 1404:

 

$total_price = ($total_price) * (1 + ($product_tax_rate / 100));

 

I am able to omit the free gift tax by prefixing that line with:

 

if ($product['id_product'] != 22)

 

But that affects all products where id_product=22, not just the first instance of the free gift. I want something like:

 

 if (!$product['is_free_gift'])

 

But I don't see any variables in $product that tell me whether the product is a free gift. Any suggestions? And has anyone else noticed that free gifts add tax to the cart?

Link to comment
Share on other sites

×
×
  • Create New...