Wrong tax amount reported to Google Analytics via the hikashopanalytics plugin

  • Posts: 195
  • Thank you received: 13
  • Hikashop Business
7 years 2 months ago #261589

-- url of the page with the problem -- : www.saundersls.com
-- HikaShop version -- : 2.6.4
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6.30

It appears the tax amount calculation is incorrect with respect to what is reported to Google Analytics via the direct call method in the hikashopanalytics plugin. We are currently using version 2.6.4 (not 3.0.0), so I'll be downloading the new code to check to see if this was fixed in the latest version.

At line 372 in the hikashopanalytics.php file (v2.6.4) is: 'tt' => round($order->order_subtotal_no_vat + $order->order_shipping_tax + $order->order_discount_tax, 2),

Earlier at line 221 the tax amount is being calculated as: $tax = ($order->order_subtotal - $order->order_subtotal_no_vat) + $order->order_shipping_tax + $order->order_discount_tax + $order->order_payment_tax;

Is it possible this code at line 372 was missed in the 2.6.4 changes?

Thanks,
Paul Proffitt


3by400, Inc.
3by400.com
Websites that Work, Marketing that Matters

Please Log in or Create an account to join the conversation.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
7 years 2 months ago #261594

Hi,

You're right, the modification had only been done in one place and not here. The line should be:
'tt' => round(($order->order_subtotal - $order->order_subtotal_no_vat) + $order->order_shipping_tax + $order->order_discount_tax, 2),
Thanks for the feedback. We'll update that on our end ASAP.

Please Log in or Create an account to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum