Post by akeelz » Mon Feb 08, 2010 5:13 am

Brilliant...Thanks... O0

Newbie

Posts

Joined
Thu Nov 05, 2009 11:08 pm

Post by MrSkins » Wed Feb 10, 2010 6:22 am

joomx wrote:
MrSkins wrote:Many thanks, yes I missed that folder, done it and for some reason its showing raw data on my home page?
When i read this ' .. missed that folder .. ', I am asking myself if you
1. have OC 1.4.0.0
2. copied all files from the OC package to your server (did you ever made a comparison?)
Yes I am using 1.4.0.0 and in an attempt rectify the problem of raw data showing in the footer, I compared all the footer.php files on my server with my original files. Mostly they all changed to include some code of Google Analytics. I then uploaded files (footer.php) to restore back to original including the footer.tpl ones but for some reason there was still raw code showing on my site.
Frustrated I zapped the whole thing and uploaded OC once again ;D

Now I have unpacked and uploaded the .zip file mentioned earlier on this thread. Now when I look at my source code there is no mention of GA being there, I have not enabled it in the admin in fear of it taking me back to square one which seems to happen every time.

Sorry this thread is dragging on, with only little ole me having the problems, I really do appreciate all your help.

If I get this sorted then I can at last add some content to my site!!

crystalcornucopia.co.uk

http://www.crystalcornucopia.co.uk


New member

Posts

Joined
Tue Feb 02, 2010 8:06 pm
Location - UK

Post by imaginetech » Wed Feb 10, 2010 8:14 am

Here is the absolute simplest way to fix this problem.

OPEN

catalog/controller/common/footer.php

FIND

$this->data['google_analytics'] = $this->config->get('google_analytics_code');

CHANGE TO

$this->data['google_analytics'] = html_entity_decode($this->config->get('google_analytics_code'), ENT_QUOTES);

Image
www.opencartstore.com
Get OpenCart Templates and OpenCart Modules.


User avatar
Active Member

Posts

Joined
Fri Sep 04, 2009 12:25 pm
Location - Darwin, Australia

Post by MrSkins » Thu Feb 11, 2010 1:07 am

Thanks for spelling that out, however that is exactly what I have been doing. One thing I would like to clear up is in the admin section do I click to enable GA in turn it asks for code to be placed in the window.

Currently this is how my footer.php code is looking.

Code: Select all

<?php
/**
 * @version		$Id: footer.php 368 2010-01-14 10:19:57Z michael $
 * @package		Common Footer - Controller
 * @copyright	(C) 2010 hhttp://www.opencart.com. All Rights Reserved.
 * @license		http://www.gnu.org/copyleft/gpl.html GNU/GPL v.3
 */
class ControllerCommonFooter extends Controller {
	protected function index() {
		$this->language->load('common/footer');

		$this->data['text_powered_by'] = sprintf($this->language->get('text_powered_by'), $this->config->get('config_store'), date('Y', time()));

		$this->id = 'footer';

		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/footer.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/common/footer.tpl';
		} else {
			$this->template = 'default/template/common/footer.tpl';
		}

		if ($this->config->get('google_analytics_status')) {
			$this->data['google_analytics'] = html_entity_decode( $this->config->get( 'google_analytics_code' ), ENT_QUOTES );
		} else {
			$this->data['google_analytics'] = '';
		}

		$this->render();
	}
}

http://www.crystalcornucopia.co.uk


New member

Posts

Joined
Tue Feb 02, 2010 8:06 pm
Location - UK

Post by OSWorX » Thu Feb 11, 2010 3:43 am

MrSkins wrote:Thanks for spelling that out, however that is exactly what I have been doing. One thing I would like to clear up is in the admin section do I click to enable GA in turn it asks for code to be placed in the window.
The code looks like it should be.
But was is your question?

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member
Online

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by MrSkins » Thu Feb 11, 2010 4:25 am

One thing I would like to clear up is in the admin section do I click to enable GA in turn it asks for code to be placed in the window.
Yes I believe (hoping) the file looks correct but nothing is showing up in my source code, refering to my above quote do I have to enable GA in the admin section?

http://www.crystalcornucopia.co.uk


New member

Posts

Joined
Tue Feb 02, 2010 8:06 pm
Location - UK

Post by OSWorX » Thu Feb 11, 2010 6:08 am

MrSkins wrote:
One thing I would like to clear up is in the admin section do I click to enable GA in turn it asks for code to be placed in the window.
Yes I believe (hoping) the file looks correct but nothing is showing up in my source code, refering to my above quote do I have to enable GA in the admin section?
Yes, this module (GA) MUST be enabled - plus the GA code in the textfield.

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member
Online

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by MrSkins » Thu Feb 11, 2010 7:18 am

Ok its beat me, this is what I have been doing pretty much from the start. Again I put the code from GA into my text field and enabled in admin then "pop" up comes raw code on my site.

Sorry guys I will leave alone now, you have all spent enough time answering my questions, its either chuck the Vaio out of the window or have a cuppa and sleep on it.. ummm kettle on.

Thanks for all your help..

http://www.crystalcornucopia.co.uk


New member

Posts

Joined
Tue Feb 02, 2010 8:06 pm
Location - UK

Post by MrSkins » Fri Feb 12, 2010 5:37 am

Put the Bl@@dy flag out, it seems my FTP program FileZilla for some reason did not upload the corrections properly needed to fix GA, instead I used my cPanel file manager and everything fell into place :o :o

http://www.crystalcornucopia.co.uk


New member

Posts

Joined
Tue Feb 02, 2010 8:06 pm
Location - UK

Post by OSWorX » Fri Feb 12, 2010 5:47 pm

As can be seen here, using a program which does not the job it should, can be also a (very big) problem.

Many of you are using FireFox (I hope so!), then use FireFTP (AddOn for FF): http://fireftp.mozdev.org/help.html

Custom Development | Individuelle Entwicklung | Support & Bugfixes

Image Image Image


User avatar
Guru Member
Online

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by PoopyBritchz » Thu Feb 25, 2010 10:14 am

imaginetech wrote:Line 33:-

Code: Select all

if ($this->config->get('google_analytics_status')) {
    $this->data['google_analytics'] = $this->config->get('google_analytics_code');
} else {
    $this->data['google_analytics'] = '';
}
Should be:-

Code: Select all

if ($this->config->get('google_analytics_status')) {
    $this->data['google_analytics'] = html_entity_decode($this->config->get('google_analytics_code'), ENT_QUOTES);
} else {
    $this->data['google_analytics'] = '';
}
Thanks... this worked great

Newbie

Posts

Joined
Thu Feb 25, 2010 9:54 am
Who is online

Users browsing this forum: No registered users and 9 guests