Archive for July, 2006

osCommerce - CRE Loaded - Remove Google Ad in the footer

If you want to remove the Google Ads that CRE Loaded adds to the footer, and ahem.. hides them so well..  edit this file: 

/includes/javascript/cart_links.js.php

Comment out or delete the last four lines before the end php tag (?>).   I won’t write out the entire code, as my blogging software (WordPress) is a little funky with the code I wanted to paste.

Comment out the lines (pseudo-code):

//echo 'table...'
//echo ‘td…’
//echo include(’http://creloaded.com/cre_google.js’);
//echo ‘/td
 

You’ll see the include statement getting the Google Ads from creloaded.com. 

Better yet! Get your own Google Ads on there.

If you do it right, you can integrate the ads well enough so it looks to be in place.

33 comments July 11th, 2006

osCommerce - How to make a dealer only site

I was running myself stupid searching for a way to make osCommerce into a dealer only site.  I didn’t need much, I just wanted users that weren’t logged in to not be able to see much.  I wanted unauthenticated users to only be able to see the login page (of course), the FAQ, Contact page, and a few information pages.

There are other osCommerce contributions that feature different pricing per customer and stuff like that.  But I think there are a lot of people like me that just needed to restrict access to the prices, product info and such.

I’ve got a bit of a caveat.  I am running CRE Loaded 6.2.  I’m sure it’s fairly simple to find the file this code should be in with a standard osCommerce install.

Here are the modifications:

In file [/templates/Original/header.php]:

at about line 18, just after this line of code:

if (DOWN_FOR_MAINTENANCE_HEADER_OFF =='false') {

 

Add this code:

//CUSTOM FOR DEALER ONLY SITE!!
if (!tep_session_is_registered('customer_id')) {
 switch($_SERVER['REQUEST_URI']) {
  case '/login.php':
  case '/login.php?action=process';
  case '/contact_us.php':
  case '/links.php':
  case '/information.php?info_id=1':
  case '/information.php?info_id=2':
  case '/information.php?info_id=3':
  case '/login.php':   
  case '/password_forgotten.php':   
   break;
  default:
   header('Location: /login.php');
   break;
 }

You’ll likely want to modify the list of ‘allowable’ files, but this should be a great start if you want simple dealer only or a dealer portal osCommerce application.

2 comments July 7th, 2006

Got my Mirror TV Kit

I got my Mirror TV Kit today.  I’ll unpack it and try it out over the weekend. 

:-)

 

1 comment July 7th, 2006

Bee or Wasp?

Help me identify this insect. Is it a bee or a wasp?

If it’s a wasp, I’m going to kill the lot of them.. if it’s a bee then I know someone who can relocate it for me. I hate wasps!
Wasp or bee? 

3 comments July 6th, 2006

Can you identify this larvae?

I found this in my garden, I’ve seen them before.. but I can’t seem to find a similar photo online.

Do you know what this is?  I live in Southwestern BC, Canada.  If you’re familiar with the USA, then it’s just a bit of a drive from Seattle, WA.

identify-this-larvae.jpg

1 comment July 6th, 2006

Ant Herding a lone Aphid

I used to think that aphids gathered together and the ants came along, protected the aphids from predation, then helped themselves to the convenient on-tap aphid-juice.

After watching them for a bit, it looks as though the ants actively herd the loose aphids into groups.

Picture this..  a lone aphid, on the journey of its life:

   lone aphid 4 lone aphid 3

 Then along comes the ever efficious ant farmer..

         lone aphid 2  lone aphid 1

And then it’s the end of the road.  No more adventure, only a life of sucking plant sap and being milked by a herd of wild ants.  (not those tame ants, but the wild ones!)

Add comment July 3rd, 2006


Calendar

July 2006
M T W T F S S
« Jun   Aug »
 12
3456789
10111213141516
17181920212223
24252627282930
31  

Posts by Month

Posts by Category