Hi
I am new to Opencart (V2.2) and have just entered my Google Analytics Code under Extensions/Analytics. However, when I save I get the following error:
Notice: Undefined index: store_id in /home/foryourw/public_html/admin/controller/analytics/google_analytics.php on line 13Warning: Cannot modify header information - headers already sent by (output started at /home/foryourw/public_html/admin/controller/startup/error.php:34) in /home/foryourw/public_html/system/library/response.php on line 12
Does anyone have any idea what the problem is and how I solve it?
Many thanks
Mel
I am new to Opencart (V2.2) and have just entered my Google Analytics Code under Extensions/Analytics. However, when I save I get the following error:
Notice: Undefined index: store_id in /home/foryourw/public_html/admin/controller/analytics/google_analytics.php on line 13Warning: Cannot modify header information - headers already sent by (output started at /home/foryourw/public_html/admin/controller/startup/error.php:34) in /home/foryourw/public_html/system/library/response.php on line 12
Does anyone have any idea what the problem is and how I solve it?
Many thanks
Mel
I am having the same problem.
Michael Bielaczyc
http://www.aradanicostumes.com
http://www.aradani.com
It seems store_id variable is not defined in google_analytics.php
$this->request->get['store_id'] is calling in the google_analytics.php
Replace $this->model_setting_setting->editSetting('google_analytics', $this->request->post, $this->request->get['store_id']);
with $this->model_setting_setting->editSetting('google_analytics', $this->request->post);
$this->request->get['store_id'] is calling in the google_analytics.php
Replace $this->model_setting_setting->editSetting('google_analytics', $this->request->post, $this->request->get['store_id']);
with $this->model_setting_setting->editSetting('google_analytics', $this->request->post);
Opencart Expert | sales[at]ost.agency
Skype - manish.osuniverse | Gtalk - manishmt
Extensions for Opencart @ https://www.ost.agency/product/product- ... extensions
ost.agency - ecommerce website design, development and digital company
The code provided by google analytics is
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-79886521-1', 'auto');
ga('send', 'pageview');
</script>
Where do I find
$this->model_setting_setting->editSetting('google_analytics', $this->request->post, $this->request->get['store_id']);
with $this->model_setting_setting->editSetting('google_analytics', $this->request->post);
Best Regards
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-79886521-1', 'auto');
ga('send', 'pageview');
</script>
Where do I find
$this->model_setting_setting->editSetting('google_analytics', $this->request->post, $this->request->get['store_id']);
with $this->model_setting_setting->editSetting('google_analytics', $this->request->post);
Best Regards
In your OpenCart store directory go to admin/controller/analytics/google_analytics.php
You will find
You will find
Code: Select all
$this->model_setting_setting->editSetting('google_analytics', $this->request->post, $this->request->get['store_id']);
Browse large collection of Premium OpenCart Themes
Hello
Those codes that you enter is not in my google_analytics.php file?
In my google_analytics.php fil are only following code:
<?php
class ControllerAnalyticsGoogleAnalytics extends Controller {
public function index() {
return html_entity_decode($this->config->get('google_analytics_code'), ENT_QUOTES, 'UTF-8');
}
}
Why is it here?
Can someone help me?
Those codes that you enter is not in my google_analytics.php file?
In my google_analytics.php fil are only following code:
<?php
class ControllerAnalyticsGoogleAnalytics extends Controller {
public function index() {
return html_entity_decode($this->config->get('google_analytics_code'), ENT_QUOTES, 'UTF-8');
}
}
Why is it here?
Can someone help me?
@kamarad
ftp into your site and go to admin/controller/analytics/google_analytics.php
there you will see the code he is talking about.
Just did this and it worked fine.
OC 2.2
ftp into your site and go to admin/controller/analytics/google_analytics.php
there you will see the code he is talking about.
Just did this and it worked fine.
OC 2.2
Who is online
Users browsing this forum: No registered users and 16 guests