Closed (fixed)
Project:
Commerce Google Analytics
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Oct 2011 at 06:17 UTC
Updated:
26 Feb 2013 at 14:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
brunorios1 commentedComment #2
urlaub commentedI can confirm this bug under latest drupal dev 7.11 and drupal commerce 7.1.0
Comment #3
wayout commentedCan also confirm I get this same message.
Comment #4
yannisc commentedSame here. PHP 5.3
Comment #5
yannisc commentedA quick solution to hide the notice is to change line 68 of commerce_google_analytics.module from:
$tax_sum += commerce_currency_amount_to_decimal($tax_component[0]['price']['amount'], $tax_component[0]['price']['currency_code']);
to:
$tax_sum += @commerce_currency_amount_to_decimal($tax_component[0]['price']['amount'], $tax_component[0]['price']['currency_code']);
Comment #6
willieseabrook commentedThis occurred for me when a tax rate is not applied. If the tax is not applied, then $tax_component[0]['price']['amount'] never exists.
The specific example on our site is that we ship to two countries - Australia and New Zealand.
Australian tax is applied to orders shipped to Australia
New Zealand tax applied to orders shipping to New Zealand
So for each order, one tax is not applied.
See my patch which adds a condition to first check whether the tax has been applied or not.
Comment #7
cyberschorschThis still needs to be reviewed please.
Comment #8
cyberschorschCommited in new 7.10 release
Comment #9
cyberschorschComment #10
zambrey commentedLooks like this fix wasn't commited
http://drupal.org/node/1136656/commits
Error still occurs in 7.x-1.0.
Comment #11
zambrey commentedActually the patch needs to be rerolled.
Also removed some extra whitespaces.
Comment #12
douggreen commentedHere is the same patch as above but without the extra spaces, and adds a period to the end of the comment (proper Drupal coding standards).
This patch (and the one above) works for me.
Comment #13
cyberschorschThanks ppl! Committed and pushed in the dev release for now.