Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to add a javascript to the whole catalogue


Recommended Posts

Posted

catalog/includes/header.php is probably what you're looking for.

It gets included on each page and forms the header, with logo, checkout / login links and breadcrumb trail.

 

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Posted

Mattice,

 

thanx for your mail, i'm working on the header file (like stated on my message) but I want to do a roll over effect there.. so I need some javascript to roll over the picture.. the script part must be in the head balises so shall I have ot edit every single page of the cataloge or doe every signle page call a kinda javascript file, like the general.js (but this one is not called everywhere)

 

thanx a lot for you time

 

Greg

Posted

You should edit all the files I'm afraid - but if you do it smart you can do all other things (meta tags etc) dynamically as well after that. Just use an include() and pull a php file inthere, like includes/header_tags.php

Have your javascript (+ other goodies) inthere.

 

This is basically how Linda's HeaderTag contribution works if I am not mistaken.

 

Regards,

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Posted

If youre not into changing all the files maybe a css rollover will work for you.

 

Quick expample

<div id="logo"><a href="url"></a></div>

in your css

div#logo {background: url(hoverimage.gif) no-repeat; height: imageHeight; width: imageWidth}

div#logo a {display: block; background: url(image.gif) no-repeat; height: imageHeight; width: imageWidth;}

div#logo a:hover {background: url(hoverimage.gif) no-repeat;}

Perdure - Transparent Object Relational Persistence
Posted

I wondered about this as well, I don't want a rollover, but I want an image map for a header created in fireworks that requires java.

 

So if I have the Header Tags Controller of SEC installed I can use the header tags.php to call a javascript?

 

Cool.

[no external urls in signatures please, kthanks]

Posted

Thanx you Mattice, Loxy and Brenden

 

I will edit all the catalog pages then and make some includes (one for the tags and css, and one for the javascript, I like organised things eheheh)

and let you know...

 

I'm modifing the design on OSC Commerce and that's quite a challenge de separate the contents and the containers ehehe

 

thanx again for all your support

 

Greg

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...