Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / My mod requires I add info between the <head> </head> and<body> </body> tags. How?

My mod requires I add info between the <head> </head> and<body> </body> tags. How?

25 Feb 2012, 5:49 AM
#1
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Post #1 by gazag

Hello,

I have a similar question... i am trying to install the mod from geckotribe.com/expop/ which requires I add info between the <head> </head> and<body> </body> tags

It is for a pop up advert deal...

I am trying to get it to work for the home page and can't get it to cooperate.

Which files do i need to edit??
and how / where do i create the on_load_*.js file??

includes/my template/common/html_header.php (is that the one for <head> </head> tags??

:frusty:

25 Feb 2012, 6:05 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

Not sure why you think you need on_load stuff. More likely just need to put the code in a properly-named jscript_xxxxxx.js file.
Ref: http://www.zen-cart.com/wiki/index.php/Customisation_-_Templates_-_Javascript

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

25 Feb 2012, 6:13 AM
#3
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Post #3 by gazag

correction to post above...

Part of the code has to go just before the <body> </body> tags not between it.....

25 Feb 2012, 6:16 AM
#4
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Post #4 by gazag

have PM'd u some info!! please help!!:cry:

25 Feb 2012, 6:21 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #5 by drbyte

You could put the PHP code that belongs between the <head>...</head> tags into /includes/templates/YOUR_TEMPLATE_NAME/jscript/jscript_expop.php

And the code that belongs before the closing </body> tag at the bottom of tpl_main_page.php

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

28 Feb 2012, 6:04 AM
#6
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Post #6 by gazag

DrByte:

You could put the PHP code that belongs between the <head>...</head> tags into /includes/templates/YOUR_TEMPLATE_NAME/jscript/jscript_expop.php

And the code that belongs before the closing </body> tag at the bottom of tpl_main_page.php

i tried that and it doesn't work any other suggestiongs??:(

Find a link to the site here

28 Feb 2012, 6:44 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #7 by drbyte

Um ... You've set the site to use the Classic template, but you've evidently not added the jscript_expop.php file to the includes/templates/classic/jscript/ folder, nor have you edited the /includes/templates/classic/common/tpl_main_page.php file.

Perhaps you made changes in a different template instead. In that case, you need to activate that template for it to work.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

28 Feb 2012, 1:40 PM
#8
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Post #8 by gazag

DrByte:

Um ... You've set the site to use the Classic template, but you've evidently not added the jscript_expop.php file to the includes/templates/classic/jscript/ folder, nor have you edited the /includes/templates/classic/common/tpl_main_page.php file.

Perhaps you made changes in a different template instead. In that case, you need to activate that template for it to work.

In my includes/templates/classic/jscript/ i have a file jscript_expop.php this has the content of <?php require_once '/homex/xxxxxxxxx/public_html/web-entrance-messenger/watcher.php'; WebEntranceHeader(); ?>

in my includes/templates/classic/common i have a file tpl_main_page.php with <?php WebEntranceMessage(); ?> right before the </body> tag on the last line!!

but its still not working !! :no::frusty:

P.S. the XXXXX's are for security to my account but are correct!!

28 Feb 2012, 2:05 PM
#9
gazag avatar

gazag

Zen Follower

Join Date:
Jun 2011
Posts:
195
Plugin Contributions:
0

Post #9 by gazag

this site is a clean install of 1.5.0 if that makes any difference - i can get the Expop (exit popup) to work by editing the files you told me :clap:

but the web entrance message doesn't want to cooperate!! as per posts above!