Forums / Templates, Stylesheets, Page Layout / Where to insert Comodo Trust Javascript and image code?

Where to insert Comodo Trust Javascript and image code?

Locked
Results 1 to 17 of 17
This thread is locked. New replies are disabled.
29 Jan 2007, 10:53
#1
leeasteadman avatar

leeasteadman

New Zenner

Join Date:
Dec 2006
Posts:
6
Plugin Contributions:
0

Where to insert Comodo Trust Javascript and image code?

Hi,
I've got a query in regards to how best insert some code global / globally across my shopping cart but also not effect core files so these code insertions are not overwritten by an update to the Zen Cart. I've changed some elements of the code to generic information.

I've been given instructions to insert the following code before the </head> tag of all my shopping cart pages:

<script language="javascript" type="text/javascript">
//<![CDATA[
var cot_loc0=(window.location.protocol == "https:")? "https://secure.ssl-supplier.net/EXAMPLEFOLDER/javascript/cot.js" :
"http://www.ssl-supplier.com/EXAMPLEFOLDER/javascript/cot.js";
document.writeln('<scr' + 'ipt language="JavaScript" src="'+cot_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>');
//]]>
</script>


And insert the below code just before </body> tag across all the shopping cart pages:


<script language="JavaScript" type="text/javascript">
COT("http://www.myshoppingcart.co.uk/HTML-images/secure_site.gif", "SC2", "none");
</script>


Thanks
29 Jan 2007, 11:11
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Where to insert Comodo Trust Javascript and image code?

head in tpl_header.php
body in tpl_main_page.php

Use override system
29 Jan 2007, 12:37
#3
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
1

Re: Where to insert Comodo Trust Javascript and image code?

actually its in the html_header.php just above the </head>
and then the tpl_main_page.php just above the </body>
29 Jan 2007, 13:31
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Posts:
31,500
Plugin Contributions:
4

Re: Where to insert Comodo Trust Javascript and image code?

Thanks Merlin for the correction
29 Jan 2007, 15:26
#5
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
1

Re: Where to insert Comodo Trust Javascript and image code?

<< isntalls 20 a week,
I got it down to an art
03 Feb 2007, 17:25
#6
leeasteadman avatar

leeasteadman

New Zenner

Join Date:
Dec 2006
Posts:
6
Plugin Contributions:
0

Re: Where to insert Comodo Trust Javascript and image code?

Thanks people, that did the trick.
09 Apr 2007, 19:44
#7
fl33140 avatar

fl33140

New Zenner

Join Date:
Mar 2007
Posts:
40
Plugin Contributions:
0

Re: Where to insert Comodo Trust Javascript and image code?

Is it possible to limit logo display only to certain pages? Can it be placed in a sidebox? I saw an old post with an archived contribution by juxizoza (that I could not find), I am assuming this is not going to applicable to the new Comodo logo?
03 Jun 2007, 14:10
#8
reza avatar

reza

Zen Follower

Join Date:
Aug 2006
Posts:
166
Plugin Contributions:
0

Re: Where to insert Comodo Trust Javascript and image code?

hi guys
I have already posted in this link something about the implementing a javascript combobox in zen product page. as I see your suggestions here with comparing to that post's suggestions, I am asking how to use these codes in your product page, as for every product the code may be different and so adding the codes in these files means general application of the code.

actually I would like to add some forms in some of my products page (better than attributes "because of time saving and possibility to make better layout of the form) and by this, the client may choose or even fill some fields before uploading his file and going to add to cart. this product is used to sell advertentions that the client may want to put in our site.
any idea how can I do it? because even very simple html -form code doesn't work; you may try it in a product page:

----------
<form id="form1" name="form1" method="post" action="MAILTO:[email protected]">
<label for="textfield">
<div align="right">car type </div>
</label>
<div align="right">
<label for="label"></label>
<p>
<input type="text" name="textfield2" id="label" />
</p>
<p>
<label for="label2">id number </label>
</p>
<p>
<input type="text" name="textfield" id="textfield" />
</p>
<p>
<label for="select">fuel<br />
</label>
<select name="select" id="select">
<option>benzin</option>
<option>gasoil</option>
<option>gas</option>
<option>mixed</option>
</select>
</p>
<p>
<label for="textarea">comments<br />
</label>
<textarea name="textarea" cols="60" rows="6" id="textarea"></textarea>
</p>
<p>
<label for="label2">external color <br />
</label>
<input type="text" name="textfield3" id="label2" />
</p>
<p>
--------
06 Jun 2007, 23:48
#9
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Posts:
1,875
Plugin Contributions:
1

Re: Where to insert Comodo Trust Javascript and image code?

Merlinpa1969:

<< isntalls 20 a week,
I got it down to an art


Merlin,

If I have a javascript that I only need to add to the checkout_success page in <head> </head> what would be the best approach to implement that. The javascript is for tracking Yahoo Search Marketing conversion.

Thanks!
07 Jun 2007, 00:37
#10
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
1

Re: Where to insert Comodo Trust Javascript and image code?

You would make a folder named checkout_success in your
includes/templates/Custom template/

inside this new folder put a copy of html_header.php

put your code inside this just above </head>

not this header file will trigger only durring checkout_success
11 Jun 2007, 02:00
#11
xena avatar

xena

Zen Follower

Join Date:
Jun 2004
Posts:
143
Plugin Contributions:
0

Re: Where to insert Comodo Trust Javascript and image code?

I am trying to add a javascript to my site, and having followed the instructions in this (and a few other) thread I still can't get the blasted thing to work.

It is a click to expand menu type script that I want to use with my product description. I have sections in my description that would be good to collapse so the viewer can just open whatever they need to read. The site is www.shopwicked.com/store to give you an idea of the product description layout, but the changes have only be added locally. The header script needs to be in the head section and the body script needs to be in the product description itself.

I added my header script to includes/templates/wicked15/product_info/html_header.php just above the </header> tag. I added the body code to the product description via Admin\Catalog\Categories/Products.
It doesn't work.

Any help would be most appreciated.
27 Jul 2007, 14:12
#12
styledata avatar

styledata

Zen Follower

Join Date:
Feb 2006
Posts:
290
Plugin Contributions:
0

Re: Where to insert Comodo Trust Javascript and image code?

Hi,
My Comodo logo is not displaying properly (following upgrade to 1.37). I have installed it as follows:

in mytemplate/common/html_header.php, just before </head>:

<script language="javascript" type="text/javascript">
//<![CDATA[
var cot_loc0=(window.location.protocol == "https:")? "https://secure.comodo.net/trustlogo/javascript/cot.js" :
"http://www.trustlogo.com/trustlogo/javascript/cot.js";
document.writeln('<scr' + 'ipt language="JavaScript" src="'+cot_loc0+'" type="text\/javascript">' + '<\/scr' + 'ipt>');
//]]>
</script>

in mytemplate/common/tpl_main_page.php just before </body>:
<script language="JavaScript" type="text/javascript">
COT("https://www.photoimprints.com/images/secure_site.gif", "SC2", "none");
</script>.

Now when I first did this yesterday, the corner logo displayed properly. Now it's gone. I see that it is being called on page load, but no display.

Does anyone have any ideas? I would like to fix this ASAP!
Thank you
27 Jul 2007, 15:00
#13
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
1

Re: Where to insert Comodo Trust Javascript and image code?

there is no callfor the image
looking at view source the script from tpl_main_page.php is missing
27 Jul 2007, 15:34
#14
styledata avatar

styledata

Zen Follower

Join Date:
Feb 2006
Posts:
290
Plugin Contributions:
0

Re: Where to insert Comodo Trust Javascript and image code?

Hi, thanks for your quick response! I think there is actually an underlying problem. This is exactly what is at the end of my /mytemplate/common/tpl_main_page.php file:

<!--eof- banner #6 display -->
<script language="JavaScript" type="text/javascript">
COT("https://www.photoimprints.com/images/secure_site.gif", "SC2", "none");
</script></body>

However, as you said, when you view the source of the compiled page, there is no script, in fact, a whole section is missing that DOES show up on a working site of mine, as follows:

<!--bof-navigation display -->
<div id="navSuppWrapper">
<div id="navSupp">
<ul>
<li><a href="http://www.religiouskeepsakes.com/">Home</a></li>
<li></li>
</ul>
</div>
</div>
<!--eof-navigation display -->

<!--bof-ip address display -->
<div id="siteinfoIP">Your IP Address is: 66.32.74.90</div>
<!--eof-ip address display -->

<!--bof-banner #5 display -->
<!--eof-banner #5 display -->

<!--bof- site copyright display -->
<div id="siteinfoLegal" class="legalCopyright">Copyright © 2003-2006 <a href="http://www.zen-cart.com" target="_blank">Zen Cart</a>. Powered by <a href="http://www.zen-cart.com" target="_blank">Zen Cart</a></div>
<!--eof- site copyright display -->

</div>
<!--bof- parse time display -->
<!--eof- parse time display -->
<!--bof- banner #6 display -->
<!--eof- banner #6 display -->
<script language="JavaScript">COT("http://www.religiouskeepsakes.com/images/secure_site.gif", "SC2", "none");</script>
</body></html>

when I compare the tpl_main_file of the working site with the tpl_main_file of the not working site in winmerge, I am getting an EOF error, which I am not sure what to do with. I tried reloading a fresh tpl_main_file but I am still not getting all the source code at the end.

Any ideas? Thanks very much!
27 Jul 2007, 15:47
#15
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
1

Re: Where to insert Comodo Trust Javascript and image code?

when you get that issue taken care of remember to use the HTTPS ion the image source code or you will throw a non secure error
27 Jul 2007, 15:53
#16
styledata avatar

styledata

Zen Follower

Join Date:
Feb 2006
Posts:
290
Plugin Contributions:
0

Re: Where to insert Comodo Trust Javascript and image code?

Merlinpa1969:

when you get that issue taken care of remember to use the HTTPS ion the image source code or you will throw a non secure error


I don't know HOW to take care of that issue. That's what I am hoping to get help on. :)
27 Jul 2007, 16:09
#17
styledata avatar

styledata

Zen Follower

Join Date:
Feb 2006
Posts:
290
Plugin Contributions:
0

Re: Where to insert Comodo Trust Javascript and image code?

I believe I got it! I would appreciate it if you take another look to confirm. I reloaded all the common files from scratch, and reset the scripts. I must have goofed something up in one or more of those files originally. Just goes to show you that the problem you think you have may not be the problem you have.
Thanks,