Post by imaginetech » Tue Jan 12, 2010 2:19 pm

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'] = '';
}

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 Daniel » Thu Jan 14, 2010 3:53 am

Thanks!

OpenCart®
Project Owner & Developer.


User avatar
Administrator

Posts

Joined
Fri Nov 03, 2006 6:57 pm

Post by max007 » Thu Jan 14, 2010 7:33 am

can you tell me the file name to fix my google analytic
i see lot bug version 1.40

Google checkout Blanc Page

Newbie

Posts

Joined
Wed Jan 13, 2010 11:25 am

Post by dangkhoaweb » Thu Jan 14, 2010 10:55 am

max007 wrote:can you tell me the file name to fix my google analytic
i see lot bug version 1.40

Google checkout Blanc Page
change in this file catalog/controler/common/footer.php
hope it helps

Newbie

Posts

Joined
Wed Jan 13, 2010 11:34 am

Post by OSWorX » Thu Jan 14, 2010 6:25 pm

Attached the fixed file - just unzip and copy to server by FTP to:
../catalog/controler/common/footer.php

Attachments

fixed footer.php


Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

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

Post by daysgonebyantiques » Sun Jan 17, 2010 9:04 am

Did that, thanks for the fix! But I'm looking at my modules and I noticed that since I upgraded to 1.4 GA is listed twice in my list of modules. I've installed one and made sure the other is uninstalled and disabled, I just thought seeing it listed twice was weird.

Days Gone By Antiques & Collectibles
FREE Continental US Shipping! Great gift ideas for ANY time of year!


Active Member

Posts

Joined
Sun Dec 13, 2009 10:02 pm


Post by tommyla » Thu Feb 04, 2010 12:55 am

big thanks, now can i see how many visitors my fathers store has! O0

Active Member

Posts

Joined
Wed Jul 22, 2009 9:49 pm
Location - Norway

Post by MrSkins » Thu Feb 04, 2010 9:19 pm

I know I'm a bit of a noob to this, I have tried to copy the new file and with no luck, also the above fix is a .php file and the footer files are .tpl anyone help, I'm must be missing something here really obvious!

I have been running the new Dark theme but found a few bugs so swapped back to the default theme, would this have any impact?

OC 1.4
crystalcornucopia.co.uk

http://www.crystalcornucopia.co.uk


New member

Posts

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

Post by OSWorX » Thu Feb 04, 2010 9:31 pm

Just download the file, unzip it locally and transfer the file (it is only one .php) to the same folder as you can see after unzipping catalog/controller/common.
Be shure that you overwrite the original file!

Thats it.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

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

Post by MrSkins » Fri Feb 05, 2010 2:28 am

Many thanks, yes I missed that folder, done it and for some reason its showing raw data on my home page?

http://www.crystalcornucopia.co.uk


New member

Posts

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

Post by Miguelito » Fri Feb 05, 2010 2:42 am

MrSkins, post your code in file catalog/controler/common/footer.php so we can see what causes that.

The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."


Active Member

Posts

Joined
Sun Jan 10, 2010 10:11 pm

Post by MrSkins » Fri Feb 05, 2010 2:46 am

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();
	}
}
Hope this helps

http://www.crystalcornucopia.co.uk


New member

Posts

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

Post by Miguelito » Fri Feb 05, 2010 2:48 am

I compared your site source code and in the end there's:

Code: Select all

</div>
</div>

    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'] = '';
    }

</body></html>
When it should be something like this:

Code: Select all

</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-12492232-1");
pageTracker._trackPageview();
} catch(err) {}</script></body></html>

The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."


Active Member

Posts

Joined
Sun Jan 10, 2010 10:11 pm

Post by Miguelito » Fri Feb 05, 2010 2:51 am

Hope you have the php code closing tag (?>) in that file?

The Finnish OpenCart Forum
"Real programmers don't document. If it was hard to write, it should be hard to understand."


Active Member

Posts

Joined
Sun Jan 10, 2010 10:11 pm

Post by imaginetech » Fri Feb 05, 2010 11:28 am

Make the edit to the footer.php controller file as per the first post in this thread and your fixed.

It's literally one line to change.

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 OSWorX » Fri Feb 05, 2010 2:04 pm

Miguelito wrote:Hope you have the php code closing tag (?>) in that file?
No need to have this.

Just for reference (good coding practice) e.g.:
#1 http://framework.zend.com/manual/en/cod ... tting.html
#2 http://blog.isnoop.net/2008/10/24/php-c ... r-cookies/

More results with your preferred search engine.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

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

Post by OSWorX » Fri Feb 05, 2010 2:07 pm

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?)

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

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

Post by spartanic » Fri Feb 05, 2010 2:49 pm

I downloaded the attachment by Joomx and overwrote the old footer file and now I get this error:

Error: Could not load template /home/jdmex2/public_html/driven2race/admin/view/template/default/template/common/footer.tpl!

Looks like the software is look for a tpl file and not the php version. Any ideas?

Newbie

Posts

Joined
Fri Feb 05, 2010 7:46 am

Post by spartanic » Fri Feb 05, 2010 3:00 pm

Nevermind, problem fixed. Turns out there's a very similar directory also located within the admin with the same footer file that screwed up when I overwrote it.

Newbie

Posts

Joined
Fri Feb 05, 2010 7:46 am

Post by OSWorX » Fri Feb 05, 2010 3:29 pm

spartanic wrote:Nevermind, problem fixed. Turns out there's a very similar directory also located within the admin with the same footer file that screwed up when I overwrote it.
That's why i wrote the folder where to place
(this is the frontend NOT the backend (admin)):
../catalog/controler/common/footer.php
see: http://forum.opencart.com/viewtopic.php ... 376#p45455

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

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

Users browsing this forum: No registered users and 25 guests