Our blog

 

CRELoaded Remove Google Ads –

If you install the free version of CRELoaded, you will see that they have sneaked some Google adverts onto the bottom of your site.

Above the adverts will be the text

This site is a member of the CRE Loaded Open Source Ecommerce Software community

Bit of an underhand tactic but I suppose you have to try to make cash where you can these days...

I could go onto a big rant about how they are trying to make cash by simply repackaging software which was always meant to be given away freely and without hitches, including both osCommerce and the multitude of contributions they have added on there. I'm not going to though. CRELoaded is a good product and these guys are keeping the osCommerce platform as a viable modern open source ecommerce platform.

Anyway - cut to the chase - to get rid of these annoying adverts all you have to do is open up

includes/javascript/cart_links.js.php

It should look like this:

PHP:
  1. <?php if ($cart_links == 'close'){$cart_link1= 'dothis';} else if ($cart_links == 'close') {$paymentclose = 'true';} if ( strstr(basename($_SERVER['SCRIPT_FILENAME']),'popup_') != basename($_SERVER['SCRIPT_FILENAME'] ) ) {@include('http://www.creloaded.com/cre_google.js');}
  2.  ?>

and replace the entire contents with

PHP:
  1. <?php if ($cart_links == 'close'){$cart_link1= 'dothis';} else if ($cart_links == 'close') {$paymentclose = 'true';}
  2. /*
  3. if ( strstr(basename($_SERVER['SCRIPT_FILENAME']),'popup_') != basename($_SERVER['SCRIPT_FILENAME'] ) ) {@include('http://www.creloaded.com/cre_google.js');}
  4. */
  5.  ?>

That's it.

More Reading:

10 Comments

E.Lantz
December 14th, 2008

CRELoaded 6.3 Remove Google Ads -

The above post clearly explains how to remove the hidden Google Ads from an Open Source installation of osCommerce CRELoaded 6.2. The following is my solution to the CRELoaded 6.3 Google Adds.
1. Open includes/template_application_top.php
2. Scroll to line 47 or where is says:

Before:

PHP:
  1. function cre_uregisterBasicFunctions(){$ch = curl_init();$timeout = 5;curl_setopt ($ch, CURLOPT_URL, 'http://www.creloaded.com/cre_google.js.html');curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);$file_contents = curl_exec($ch);curl_close($ch);echo $file_contents;}
  2. } else {function cre_uregisterBasicFunctions(){@include('http://www.creloaded.com/cre_google.js.html');}}

After:

PHP:
  1. if(function_exists("curl_init") &amp;&amp;  function_exists("curl_setopt") &amp;&amp; function_exists("curl_exec") &amp;&amp; function_exists("curl_close")){
  2. function cre_uregisterBasicFunctions(){$ch = curl_init();$timeout = 5;curl_setopt /*($ch, CURLOPT_URL, 'http://www.creloaded.com/cre_google.js.html')*/;curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);$file_contents = curl_exec($ch);curl_close($ch);echo $file_contents;}
  3. }/* else {function cre_uregisterBasicFunctions(){@include('http://www.creloaded.com/cre_google.js.html');}}*/

Please note where I have commented out certain portions of the code.
It's a very simple fix but both sections need to be commented out or deleted.
Ez

(edited by admin for clarity)

 

admin
December 15th, 2008

Thanks for that E Lantz

 

rajah
December 21st, 2008

E.Lantz, you're awesome! Thanks for your contribution. Ive been searching for the past two days and many people are searching for this solution. Glad I came across this post! Thanks again.

 

Chris
February 1st, 2009

Thanks for the tutorial, was looking everywhere for the v6.3 guide. Very informative

 

admin
February 2nd, 2009

just for clarification there

I would personally recommend commenting out the whole block for performance reasons

 

xaurav
November 30th, 2009

Please Correct it

Replace

function cre_uregisterBasicFunctions(){$ch = curl_init();$timeout = 5;curl_setopt ($ch, CURLOPT_URL, 'http://www.creloaded.com/cre_google.js.html');curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);$file_contents = curl_exec($ch);curl_close($ch);echo $file_contents;}
} else {function cre_uregisterBasicFunctions(){@include('http://www.creloaded.com/cre_google.js.html');}}

With

function cre_uregisterBasicFunctions(){$ch = curl_init();$timeout = 5;curl_setopt /*($ch, CURLOPT_URL, 'http://www.creloaded.com/cre_google.js.html')*/;curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);$file_contents = curl_exec($ch);curl_close($ch);echo $file_contents;}
}/* else {function cre_uregisterBasicFunctions(){@include('http://www.creloaded.com/cre_google.js.html');}}*/

 

Mircea
June 10th, 2010

Simpler and better solution,
replace the above function with:
if (function_exists("curl_init") && function_exists("curl_setopt") && function_exists("curl_exec") && function_exists("curl_close")) {
function cre_uregisterBasicFunctions(){
return true;
}
} else {
function cre_uregisterBasicFunctions(){
return true;
}
}

 

supriti
August 19th, 2010

Thanks A LOT !!!!
U r Amazing !

I have been looking for the solution for so many hrs

Thanks again .... :)

 

Anantha.KN
October 15th, 2010

Thank you for the help

 

Key2
February 23rd, 2011

Thanks E Lantz :)

 

 

Leave a Reply