2017-08-18 87 views
0

我在整合2.2.0 Opencart的googleanlaytics,一些錯誤反映Opencart的2.2.0谷歌分析

Notice: Undefined index: store_id in /home/domainname/public_html/test/admin/controller/analytics/google_analytics.php on line 13Warning: Cannot modify header information - headers already sent by (output started at /home/domainname/public_html/test/admin/controller/startup/error.php:34) in /home/domainname/public_html/test/system/library/response.php on line 12 

我怎樣才能解決這個問題

回答

0

谷歌Analytics(分析)可以輕鬆地添加到您的Opencart的安裝通過打開文件:目錄/視圖/主題/ {您的模板的名稱} /common/footer.tpl

或者如果它是opencart 3.x 目錄/視圖/主題/ {您的模板的名稱} /common/footer.twig

和標籤之前你添加你的谷歌分析js代碼。保存文件並上傳。

STORE_ID就無關緊要了這個任務,除非你添加/安裝谷歌分析,將提供每家商店一個谷歌分析代碼的擴展名(如果您正在使用Opencart的MultiStore的功能)

0

感謝您的回覆。我解決了這個問題。似乎STORE_ID變量沒有google_analytics.php

$this->model_setting_setting->editSetting('google_analytics'‌​, $this->request->post); 
定義更換

$this->model_setting_setting->editSetting('google_analytics'‌​, $this->request->post, $this->request->get['store_id']);