lat9 / ga4-analytics

A plugin to provide GA4 analytics for Zen Cart stores
GNU General Public License v2.0
1 stars 2 forks source link

Log on account_history_info page #11

Closed scottcwilson closed 1 year ago

scottcwilson commented 1 year ago
[19-Mar-2023 05:03:51 America/Chicago] Request URI: /client/index.php?main_page=account_history_info&order_id=17024, IP address: ::1
#0 /Users/scott/sites/client/includes/classes/observers/class.ga4_analytics.php(237): zen_debug_error_handler()
#1 /Users/scott/sites/client/includes/classes/traits/NotifierManager.php(87): ga4_analytics->update()
#2 /Users/scott/sites/client/includes/templates/bootstrap/common/tpl_main_page.php(300): base->notify()
#3 /Users/scott/sites/client/index.php(94): require('/Users/scott/si...')
--> PHP Warning: Undefined array key "price" in /Users/scott/sites/client/includes/classes/observers/class.ga4_analytics.php on line 237.

Not sure if ignoring calls on the account history pages is the way to go but if so, could just add

+                if (strpos($current_page_base, 'history') !== FALSE) {
+                   return;
+                }

above the $current_page_base check for '_info'.