Post by silkcamel » Wed May 04, 2016 4:37 am

Dear All,

I created the google analytics account, and installed the google analytics in Opencart 2.2.0.0,

Pasted the code, after I click save there is an error:

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

anybody can help on this issue? Thanks.

New member

Posts

Joined
Sun May 01, 2016 6:05 am

Post by straightlight » Wed May 04, 2016 4:51 am

Since I do not see anywhere else on that file where the store_id is being used,

In admin/controller/analytics/google_analytics.php file,

find:

Code: Select all

$this->model_setting_setting->editSetting('google_analytics', $this->request->post, $this->request->get['store_id']);
replace with:

Code: Select all

$this->model_setting_setting->editSetting('google_analytics', $this->request->post);
This should resolved the problem.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by doktorek » Thu May 05, 2016 6:59 am

Thanks. I dont know about the OP but it worked for me.

New member

Posts

Joined
Thu Apr 28, 2016 8:40 pm

Post by dragonfly-ie » Mon May 30, 2016 4:28 pm

Thanks a lot. Works perfectly for single store. 8)

See multi-store solution here: http://forum.opencart.com/viewtopic.php?f=191&t=160302

Dum spiro spero.


User avatar
New member

Posts

Joined
Sat Nov 09, 2013 2:31 am


Post by nasirkhan » Tue Jul 26, 2016 4:04 pm

tried both of the solutions but the Google Analytics cod is not visible on the website.

Nasir Khan Saikat
http://nasirkhn.com


Newbie

Posts

Joined
Tue Jul 26, 2016 2:17 pm
Location - Dhaka, Bangladesh

Post by kamarad » Wed Sep 21, 2016 6:23 pm

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?

Newbie

Posts

Joined
Sun Feb 14, 2016 6:09 am
Who is online

Users browsing this forum: No registered users and 12 guests