Hi all. I've set up a "wholesale" customer group with its own .5% sales tax. I've noticed that sometimes paypal will not include the tax. It's funny but it's usually when there are 3 items in the shopping cart. When i have 2 or 4 items paypal will show and include the tax. It only happens with my customers under the wholesale group, paypal works fine with the regular customers tax. This is the code i used and put the Tax.php file into override/classes/tax...
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 == 5) {
$taxratenew = .5;
[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;
}
Anybody know why paypal sometimes excludes the tax for wholesalers??? Thanks in advance.