Forums / Templates, Stylesheets, Page Layout / remove script from product info pages?

remove script from product info pages?

Locked

Views: 1,413

Results 1 to 2 of 2
This thread is locked. New replies are disabled.
14 Apr 2007, 11:56 PM
#1
doodlebee avatar

doodlebee

Inactive

Join Date:
Jan 2006
Posts:
228
Plugin Contributions:
0

remove script from product info pages?

Is it possible to remove a sitewide script from only the product_info pages? I can't seem to get the right syntax for this.

I've saved the file without the "jscript" at the beginning of the filename, hoping I could call it in to all pages, then use a conditional to keep it from appearing on the product_info pages, but I've had no luck.

If, by chance anyone has a better idea of how I could accomplish what I want - what I'm trying to do is remove the Image Handler 2 script from the product info pages - I don't want a popup for a larger image to be available from that page. I'd like the "larger image" link to be gone, and I don't want the image to have the popup link on it.

The only way I can thin of to do this is by using a conditional to remove the script from those pages only - but as I said, I can't seem to get the syntax right.

Anyone have any ideas for me, please?

16 Apr 2007, 2:55 PM
#2
doodlebee avatar

doodlebee

Inactive

Join Date:
Jan 2006
Posts:
228
Plugin Contributions:
0

Re: remove script from product info pages?

Okay - got it. I renamed the script file so the "jscript_" wasn't in front of it. Then I added this line right before the </head>:

if ($tmp_products_id != '') {}
else { echo '<script type="text/javascript" src="' . DIR_WS_TEMPLATE . 'jscript/imagehover.js"></script>'. "\n";}

Now the script does not appear on any products page (but it will appear on the listing pages, etc.)

Cool.