X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   How to add a Secure Cert Logo to your pages (https://forum.x-cart.com/showthread.php?t=6004)

shan 01-13-2004 07:12 AM

How to add a Secure Cert Logo to your pages
 
If you have a secure certificate from trust heres a quick walkthrough for getting the logos added to you site

This was done on a 3.5.x site but is pretty much the same for all versions. The only thing that would be any different is the menu part

make sure that you have uploaded your secure_site.gif to your skin1/images dir

new file secure_cert.tpl

Code:

<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td align="center" valign="top"><!--
TrustLogo Html Builder Code:
Shows the logo at URL https://www.mysecuresite.com/shop/skin1/images/secure_site.gif
Logo type is Secure Site Seal - For SSL Certificate holders ("SC")
Not Floating
//-->

{literal}
<script type="text/javascript">TrustLogo("https://www.mysecuresite.com/shop/skin1/images/secure_site.gif", "SC", "none");</script>
{/literal}</td>
  </tr>
</table>


notice the {literal}{/literal} tags around the javascript

add this code between the head tags of

customer/home.tpl
single/home.tpl
partner/home.tpl (if you use affiliate)

Code:

{* SECURE SITE CODE STARTS HERE *}
{literal}
<script language="JavaScript" src="https://secure.comodo.net/trustlogo/javascript/trustlogo.js" type="text/javascript">
</script>
{/literal}

{* SECURE SITE CODE ENDS HERE *}


again notice the {literal}{/literal} tags around the javascript

then to get he logo to appear on your pages add this code where you want the cert to appear in the following files

customer/home.tpl
single/home.tpl
partner/home.tpl (if you use affiliate)

Code:

{ include file="secure_cert.tpl"}

If you want the code to appear as a menu item then make secure_cert.tpl look like this ....

Code:

{* $Id: secure_cert.tpl *}
{capture name=menu}

<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td align="center" valign="top">
<!--
TrustLogo Html Builder Code:
Shows the logo at URL https://www.mysecuresite.com/shop/skin1/images/secure_site.gif
Logo type is Secure Site Seal - For SSL Certificate holders ("SC")
Not Floating
//-->

{literal}
<script type="text/javascript">TrustLogo("https://www.mysecuresite.com/shop/skin1/images/secure_site.gif", "SC", "none");</script>
{/literal}</td>
  </tr>
</table>

{/capture}
{ include file="menu.tpl" dingbats="dingbats_help.gif" menu_title="Secure Certificate" menu_content=$smarty.capture.menu}


dont forget to replace the java code with the code that you get from the trust setup page http://www.trustlogo.com/ssl-certificate-support/index.html

also note that i set the images to call from the secure location (https://www.mysecuresite.com)rather then the http location so as not to cause any errors

Gibberish 01-13-2004 09:27 AM

Here is mod if you use GeoTrust.

secure_cert.tpl:

Code:

<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td align="center" valign="top">
{literal}
<script language="JavaScript" type="text/javascript" src="https://smarticon.geotrust.com/si.js"></script>
{/literal}</td>
  </tr>
</table>


customer/home.tpl:

Code:

{* SECURE SITE CODE STARTS HERE *}
{literal}
<script language="JavaScript" fptype="dynamicanimation">
<!--
function dynAnimation() {}
function clickSwapImg() {}
//-->
</script>
<script language="JavaScript1.2" fptype="dynamicanimation" src="http://www.mywebsite.com/animate.js">
</script>
{/literal}
{* SECURE SITE CODE ENDS HERE *}

[/code]

enge919 01-16-2004 11:55 PM

Is this supposed to be a fancier way of just showing the good ol' ???

I tried the code on my site and nothing showed up...what's it supposed to do vs. the way I have it above.

By the way, I use the comodo cert

shan 01-17-2004 01:40 AM

Quote:

Originally Posted by enge919
Is this supposed to be a fancier way of just showing the good ol' ???

I tried the code on my site and nothing showed up...what's it supposed to do vs. the way I have it above.

By the way, I use the comodo cert


yeh, its not rocket science but thought it may help some people.

I happened to be adding a logo to a site and thought I'd post it.

Problem with your way is that it would bring up an insecure error as your calling a file from http :wink:

enge919 01-17-2004 09:16 AM

Whoops, thanks for calling that Shan.

I actually just called that code from my head. I really just use a relative path for most of my images, /store/skin1/images/new/secure_cert.gif or {$ImagesDir}/new/secure_cert.gif and that, as you know keeps the errors from poping up on the secure part of the site.

Also brain freezed and forgot to put my include path "customer" which is where I created the secure_cert.tpl and got it to work. {include file="customer/secure_cert.tpl"}

Unfortunately, I just got the cheap cert to be sure the site was protected and not the fancy one that actually displays all the info on mouseover.

I saw no one had any replies in here, so maybe this will help someone else out.

Thanks man!

Gibberish 01-19-2004 08:18 AM

reason I posted geotrust is because they do not give you a logo to call from. You have to call it from their server, so it's alittle harder then just calling from the {$ImagesDir}.

nfc5382 01-25-2005 06:02 PM

this is a great summary, thanks!

Khar 04-18-2005 06:35 PM

hello,

i am having problems using this mod.

i would like to install a square trade security seal. the code is a java .js file that reads out to a server for the image. therefore, i need the secure pages to be https and the insecure pages to display the seal through http.

my problem, i am placing the seal on the home.tmp which feeds to both the secure and non secure pages.

what should i do?

please help

Tequilaboy 06-01-2005 06:40 PM

I followed the steps outlined above... placed the secure_cert.tpl file in the site root, edited the header portions of the files listed and placed the line of code that sets the location of the logo in "skin1/customer/home.tpl" just under the line that reads [img]{$ImagesDir}/spacer.gif[/img]
, which should place the logo just underneath left menu options.

I'm getting the following error:
Quote:

Warning: Smarty error: unable to read resource: "/secure_cert.tpl" in /usr/home/www/madragz180/madragzstore.com/docs/Smarty-2.6.3/Smarty.class.php on line 1082

The only thing on line 1082 of that file is:
Code:

trigger_error("Smarty error: $error_msg", $error_type);

Not 100% if the error is refering to the smarty.class.php file or the sercure_cert.tpl file. When creating the secure_cert.tpl I simply made a txt file, copied the code into it and renamed it to a tpl.
Little help would be much appreciated

balinor 06-02-2005 03:59 AM

The secure_cert.tpl doesn't go in the SITE root...it goes in the XCART root. That error is due to X-Cart not being able to find the template.

Tequilaboy 06-02-2005 08:39 PM

It is in the X-Cart root. That's what I meant to say.
So, should I put copies of the file in the other folders as well?

Matt B 06-14-2005 07:13 AM

ok, I'm a way newbie here...so for Geotrust, I need to create a new file called secure_cert.tpl and then upload that to the xcart root? Then I would need to add the code to the customer_home.tpl? Do I add that code at the bottom, or in a particualr spot?

MattB


Quote:

Originally Posted by Gibberish
Here is mod if you use GeoTrust.

secure_cert.tpl:

Code:

<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td align="center" valign="top">
{literal}
<script language="JavaScript" type="text/javascript" src="https://smarticon.geotrust.com/si.js"></script>
{/literal}</td>
  </tr>
</table>


customer/home.tpl:

Code:

{* SECURE SITE CODE STARTS HERE *}
{literal}
<script language="JavaScript" fptype="dynamicanimation">
<!--
function dynAnimation() {}
function clickSwapImg() {}
//-->
</script>
<script language="JavaScript1.2" fptype="dynamicanimation" src="http://www.mywebsite.com/animate.js">
</script>
{/literal}
{* SECURE SITE CODE ENDS HERE *}

[/code]


shan 06-14-2005 07:20 AM

you add the code in home.tpl wherever u want the cert to appear

ObjectZero 08-30-2005 09:58 AM

that worked like a charm

mt 09-07-2005 07:05 PM

I am having trouble placing the trust logo on our front page of our website. I am really new however i can edit tpl's now. I am not sure in which files and where in them where to place the http call for an image command. I don;t have access to a trustlogo.gif as the webpage does not allow downloads. Help!
Matt :x

Dongan 09-07-2005 08:32 PM

Quote:

Originally Posted by mt
I am having trouble placing the trust logo on our front page of our website. I am really new however i can edit tpl's now. I am not sure in which files and where in them where to place the http call for an image command. I don;t have access to a trustlogo.gif as the webpage does not allow downloads. Help!
Matt :x


contact me. Will help you to fix at free.

LouOffroad 09-11-2005 05:21 AM

Just a recap of other posts. Here's what I did to display our ComodoSSL cert in both unsecure site browsing as well as on the SSL side.

In /skin1/customer/home.tpl right before the </HEAD> tag I placed this:

Code:

{if $current_location eq $http_location}
{literal}<script language="JavaScript" src="http://www.trustlogo.com/trustlogo/javascript/trustlogo.js" type="text/javascript"></script>{/literal}
{else}
{literal}
<script language="JavaScript" src="https://secure.comodo.net/trustlogo/javascript/trustlogo.js" type="text/javascript"></script>{/literal}{/if}


Then I edited /skin1/customer/menu_cart.tpl and added this code after the last {/if} tag:

Code:


<CENTER>{literal}<script type="text/javascript">TrustLogo("images/comodoSSL.gif", "SC", "none");</script>{/literal}
Point to Verify</CENTER>


Hopefully this will help someone in the future. This works perfectly on our 4.0.12 site.

Cheers

mt 09-12-2005 03:31 AM

It accepted the code but no logo. I placed the code but it requires an SSL logo to be in the images file. The script needs to collect it on the web. Can you suggest a script to connect to it?

LouOffroad 09-12-2005 09:24 AM

I have the logo on my server in the /<skin>/images directory. It's not being pulled from Comodo like it is with some of the other cert companies.

jmoreno 09-15-2005 01:14 AM

Shan. Thanks for the Mod. Its working perfect.

ShishaPipeUK 02-20-2006 01:04 PM

Thanks for the mod LouOffroad, works great. I used the new bottom corner COMODO logo, bottom right and the code i used was to pick up the logo from my main site images.

skin1/customer/home.tpl - Just before the </head> place:

Code:

{literal}<script>
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('<script language="JavaScript" src="'+cot_loc0+'" type="text\/javascript"><\/script>');
</script>{/literal}


Then at skin1/customer/menu_cart.tpl - After the last </if> and before </capture>

Code:

{literal}<script language="JavaScript">COT("https://www.shisha.co.uk/images/cornertrust.gif", "SC2", "none");</script>{/literal}

This points to the image cornertrust.gif in my main images folder.

The cornertrust.gif looks like this, you can right click it and save the image http://www.shisha.co.uk/images/cornertrust.gif

You can see the finished page at http://www.shisha.co.uk/shopcart/home.php

You can see it is at the bottom right and always stays there no mater how far you scroll down the page :o)

alohacomputer 03-02-2006 05:33 AM

Quote:

Originally Posted by Gibberish
Here is mod if you use GeoTrust.

secure_cert.tpl:

Code:

<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td align="center" valign="top">
{literal}
<script language="JavaScript" type="text/javascript" src="https://smarticon.geotrust.com/si.js"></script>
{/literal}</td>
  </tr>
</table>


customer/home.tpl [Between Head tags]:

Code:

{* SECURE SITE CODE STARTS HERE *}
{literal}
<script language="JavaScript" fptype="dynamicanimation">
<!--
function dynAnimation() {}
function clickSwapImg() {}
//-->
</script>
<script language="JavaScript1.2" fptype="dynamicanimation" src="http://www.mywebsite.com/animate.js">
</script>
{/literal}
{* SECURE SITE CODE ENDS HERE *}

[/code]


add this code to

customer/home.tpl
single/home.tpl

{ include file="secure_cert.tpl"}




I tried to setup as above but get this error displayed on my pages.


Warning: Smarty error: unable to read resource: "secure_cert.tpl" in /home/refurb/public_html/shop/Smarty-2.6.9/Smarty.class.php on line 1088

Vacman 03-22-2006 10:10 PM

Err - never mind - fixed it...

dazybabes 03-23-2006 07:56 AM

Thanks to ShishaPipe I managed to get this certificate working all ok on my site the only problem is that it knocked out one of my backgrounds!?

www.kitinfo.co.uk
if you look at this page you'll see the blue background on the left scrolls down all the way but if you look at the php home version

www.kitinfo.co.uk/kitwarehouse/home.php

Ive managed to get the comodo logo all in working ok but it has moved the blue background to the right hand side?!

any ideas?

ShishaPipeUK 03-23-2006 08:25 AM

Dazybabes, here is my full head code for skin1/customer/home.tpl

Code:

{* $Id: home.tpl,v 1.67.2.10 2005/10/31 11:36:14 max Exp $ *}
{if $printable ne ''}
{include file="customer/home_printable.tpl"}
{else}
{config_load file="$skin_config"}
<HTML>
<HEAD>
<script language=JavaScript1.3 src="{$SkinDir}/capitalise.js"></script>
<TITLE>
{if $cat and $current_category.meta_title and not $smarty.get.productid}
{$current_category.meta_title}
{else}
{if $config.SEO.page_title_format eq "A"}
{section name=position loop=$location}
{$location[position].0|escape}
{if not %position.last%} :: {/if}
{/section}
{else}
{section name=position loop=$location step=-1}
{$location[position].0|escape}
{if not %position.last%} :: {/if}
{/section}
{/if}
{/if}
</TITLE>
{ include file="meta.tpl" }
<LINK rel="stylesheet" href="{$SkinDir}/{#CSSFile_c#}">
<script language="JavaScript" src="{$SkinDir}/copybilling2.js"></script>
<script language="JavaScript" src="{$xcart}/shopcart/track.js"></script>
{if $js_enabled}
{include file="customer/main/swap_categories_js.tpl"}
{/if}
{literal}<script>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('<script language="JavaScript" src="'+cot_loc0+'" type="text\/javascript"><\/script>');</script>
{/literal}
</HEAD>


dazybabes 03-24-2006 04:38 AM

Got it sorted thanks Shisha Pipes

I've altered the css for the background image previously it was on the left hand side by default but Ive put a background align:left;
on it and it has brought it over?!

Thanks

iConcepts 06-30-2006 06:41 PM

Does anyone have the Comodo "Corner of Trust" trust logo working properly in IE?

As mentioned in this post, a popup window appears whenever you click anywhere on a page in IE. It works fine in Firefox. Also,I do not have this problem with other sites running other storefront software so I am wondering if it has something to do with Smarty.

Anyone have any thoughts?

Bob

Vacman 06-30-2006 07:55 PM

Quote:

Originally Posted by iConcepts
Does anyone have the Comodo "Corner of Trust" trust logo working properly in IE?

As mentioned in this post, a popup window appears whenever you click anywhere on a page in IE. It works fine in Firefox. Also,I do not have this problem with other sites running other storefront software so I am wondering if it has something to do with Smarty.

Anyone have any thoughts?

Bob


Yep - Check out my site:
http://www.vacsew.com/xcart
http://www.vacsew.com

iConcepts 07-01-2006 10:30 AM

Vacman-

Do you recall what you did to fix it? Or better yet, do you have the code snippet you used?

Thanks-

Bob

Vacman 07-01-2006 09:20 PM

Bob:
/skin1/customer/home.tpl

Code:

{* $Id: home.tpl,v 1.67.2.9 2005/06/28 12:02:38 svowl Exp $ *}

{if $printable ne ''}
{include file="customer/home_printable.tpl"}
{else}
{config_load file="$skin_config"}
<HTML>
<link rel="P3Pv1" href="http://www.vacsew.com/w3c/p3p.xml">
<HEAD>
<TITLE>
{if $config.SEO.page_title_format eq "A"}
{section name=position loop=$location}
{$location[position].0|escape}
{if not %position.last%} :: {/if}
{/section}
{else}
{section name=position loop=$location step=-1}
{$location[position].0|escape}
{if not %position.last%} :: {/if}
{/section}
{/if}
</TITLE>
</SCRIPT>

{ include file="meta.tpl" }
<LINK rel="stylesheet" href="{$SkinDir}/{#CSSFile#}">


Insert After the above code:

Code:

<script language="JavaScript" src="http://www.trustlogo.com/trustlogo/javascript/cornertrust.js" type="text/javascript"></script>

There may be others, but that is the one I remember being the most trouble.

eastman 07-20-2006 08:21 AM

Thanks to Shan for the great mod and LouOffroad for the 4.0 instructions.

ncups@cox.net 12-05-2006 10:31 PM

Re: How to add a Secure Cert Logo to your pages
 
Thanks to Shan's post I had the comodo cert. logo working.

Unfortunately, a couple of days ago the logo quit displaying without me making any changes to the site. I have tried re-installing and setting it up again several times to no avail. If anyone has any ideas on how to get the logo to show up again on x-cart gold 4.1.3 with the fashion mosaic template I'm all ears.

I have tried all of the other mods listed in this thread and none seem to work.

big pine kenny 12-16-2006 06:41 PM

Re: How to add a Secure Cert Logo to your pages
 
I also can not get my image, it is taken from there web site. They said to use this to display logo. I belive it would be the same as Geo Trust does anyone know or can show me.
<script language="Javascript" src="<A href="https://seal.godaddy.com/getSeal?sealID=307034"></script">https://seal.godaddy.com/getSeal?sealID=307034"></script>

newattraction 01-14-2007 10:01 AM

Another Way to Add a Comodo InstallSSL Secure Cert Logo to Your Pages
 
Another Way to Add a Comodo InstallSSL Secure Cert Logo to Your Pages:lol:
FOR X-CART GOLD v4.1.5:D

Assuming that your X-Cart install directory is ⌠xcartdirectory■, and you saved your Comodo InstallSSL logo image in skin1\images\secure_site.gif.

Step 1. Make a new file \skin1\secure_cert.tpl:

Code:

{literal}<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>{/literal}


Step 2. Add the following code:

Code:

{include file="secure_cert.tpl"}

To the very beginning part of the following files:
  • \skin1\head.tpl --(right after {* $Id: head.tpl,v 1.58 2006/03/17 08:50:44 svowl Exp $ *})
  • \skin1\head_admin.tpl --(right after {* $Id: head_admin.tpl,v 1.10 2006/03/17 08:50:44 svowl Exp $ *} )
  • AND any other header files of the pages where you want the logo to appear.
Step 3. Make a new file \skin1\secure_logo.tpl:

Code:

{literal}<script language="JavaScript" type="text/javascript">
COT("../xcartdirectory/skin1/images/secure_site.gif", "SC2", "none");
</script>{/literal}


Change xcartdirectory accordingly. If your X-Cart is installed in root, use: ../skin1/images/secure_site.gif.

Step 4. Add the following code:

Code:

{include file="secure_logo.tpl"}

To the very bottom part of the following files:
  • \skin1\bottom.tpl --(right after </table>)
  • AND any other footer files of the pages where you want the logo to appear.
DONE!:D/

IMPORTANT NOTE: Please use relative path in your script (with few exceptions). That means NO http:// in any of your .tpl files that will output to a web page. Otherwise, security warning may pop up. Example: Use URL ../home.php for HOME tab on Speed Bar instead of URL http://mydomain.com/.

Feel free to visit my site www.vonbell.com, add an item to cart, and click on "Checkout" to see how it works.

Good luck!

Guosheng
VonBell
www.vonbell.com

nfc5382 01-14-2007 01:53 PM

Re: How to add a Secure Cert Logo to your pages
 
i noticed that with the secure logo, sometimes the site will hang when trustlogo.com is slow. might want to just put the logo and not link to anything...

herbj 03-19-2007 05:40 AM

Re: How to add a Secure Cert Logo to your pages
 
Quote:

Originally Posted by Gibberish
Here is mod if you use GeoTrust.

secure_cert.tpl:

Code:

<table width="100%" border="0" cellspacing="0" cellpadding="5">
  <tr>
    <td align="center" valign="top">
{literal}
<script language="JavaScript" type="text/javascript" src="https://smarticon.geotrust.com/si.js"></script>
{/literal}</td>
  </tr>
</table>


customer/home.tpl:

Code:

{* SECURE SITE CODE STARTS HERE *}
{literal}
<script language="JavaScript" fptype="dynamicanimation">
<!--
function dynAnimation() {}
function clickSwapImg() {}
//-->
</script>
<script language="JavaScript1.2" fptype="dynamicanimation" src="http://www.mywebsite.com/animate.js">
</script>
{/literal}
{* SECURE SITE CODE ENDS HERE *}

[/code]


I receive an error in my server log when I load my site and the load calls this section of code:

Code:

<script language="JavaScript1.2" fptype="dynamicanimation" src="http://www.mywebsite.com/animate.js">
</script>


The error is: "http://www.collectibleswordsusa.com/animate.js" File not found.

I copied the code verbatim and installed were indicated. Should I have done something more. I do not have the file "/animate.js" in my root.

Any help appreciated.

MarkH 03-22-2007 12:15 AM

Re: How to add a Secure Cert Logo to your pages
 
find that file and re-try?

herbj 03-22-2007 04:32 AM

Re: How to add a Secure Cert Logo to your pages
 
Quote:

Originally Posted by MarkH
find that file and re-try?


That would be the obvious step, however it turns out that little snippet of code has nothing to do with the GeoTrust Cert Logo.

I just removed the code and that fixed the problem. :-)

Not sure why that code was included in previous posts but I had no use for it. It may be correct for someone else's install but not mine.

Either way I appreciate all the efforts of everyone here on the forum that help make x-cart all it can be.

I certainly appreciate all the guidance that is provided for us beginners-!! :?

MarkH 03-22-2007 04:34 AM

Re: How to add a Secure Cert Logo to your pages
 
Glad you got that fixed : )


Cheers,

Mark

sandyscloset 06-06-2007 06:06 PM

Re: How to add a Secure Cert Logo to your pages
 
NewAttraction, I followed your instructions above and finally got the comodo logo to show up fine, just one glitch, got this squirly code showing up at the top of every site page: (  ) basically that's supposed to be an i with 2 dots over it, 2 brackets and an upside down question mark...

Not sure which of the 5 pages of code above would create this, you can see it at http://sandyscloset.net/home.php

anyone have any ideas? thanks in advance.


All times are GMT -8. The time now is 06:34 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.