Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Display Thawte Certificate

Display Thawte Certificate

Views: 814

Results 1 to 3 of 3
23 Jul 2012, 4:29 PM
#1
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Display Thawte Certificate

Hi folks. This exact question has been asked before http://www.zen-cart.com/showthread.php?150602-Displaying-a-thawte-ssl-image-certificate but thread is closed with no answers. So, how would one go about loading the Thawte SSL certificate to a sidebox please? I tried using blank sidebox addon but couldn't get the script to work, it merely gave me a link to thawte website rather than the verification of my certificate. I haven't posted a link as I always work on a local version before trying live...could that fact even be the reason it doesn't display? Many thanks in advance.

23 Jul 2012, 6:55 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Display Thawte Certificate

First, get the right code from: http://www.thawte.com/ssl/secured-seal/installation-agreement/index.html

You will generate your SITE SEAL code using tools on that page.

What we usually do is create a CLONE of the BLANK SIDEBOX and rename the files (and then edit some of the PHP) to define this as the THAWTE SIDEBOX.

There are THREE FILES to consider:

includes/languages/english/extra_definitions/blank_sidebox_defines.php

includes/modules/sideboxes/blank_sidebox.php

includes/templates/template_default/tpl_blank_sidebox.php

FIRST thing we do is this:

includes/languages/english/extra_definitions/thawte_sidebox_defines.php

includes/modules/sideboxes/thawte_sidebox.php

includes/templates/template_default/tpl_thawte_sidebox.php

SECOND thing we do is open EACH of these files for editing

Where we see the word blank we change it to thawte (note the lower case nature of the words)

Where we see the word BLANK we change it to THAWTE (note the UPPER CASE nature of the words)

THIRD things we do is use the facility in the TPL file to embed the code (rather than the LANGUAGE FILE)

So we open:
includes/templates/template_default/tpl_thawte_sidebox.php

<?php
/**
 * thawte sidebox - allows a thawte sidebox to be added to your site
 *
 * @package templateSystem
 * @copyright 2007 Kuroi Web Design
  * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: thawte_sidebox.php 2007-05-26 kuroi $
 */

  $content = '';
  $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';

  // Replace the text and HTML tags between the apostophes on lines 19 and 20.
  // Use as many or as few lines using this model as you need for your custom content.
  // If you have a multilingual site define your text in the languages/YOUR_LANGUAGE/extra_definitions/thawte_sidebox_defines.php and include it as shown in line 19.
  // If your site is monolingual, you can put the text right here as shown on line 20 (and nobody will know!)
  $content .= '<!--<p>' . TEXT_THAWTE_SIDEBOX . '</p>-->';
  $content .= '<script type="text/javascript" src="https://seal.thawte.com/getthawteseal?host_name=YOURWEBSITE.co.uk&size=M&lang=en"></script>';

  $content .= '</div>';
?>

Notice how we COMMENT OUT the call from the languages file:

$content .= '<!--<p>' . TEXT_THAWTE_SIDEBOX . '</p>-->';

Naturally, if you want to use the defines in the languages folder, you are free to do so.

20 years a Zencart User

23 Jul 2012, 9:59 PM
#3
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Display Thawte Certificate

Schoolboy strikes again :hug:
Thank you very much. In a nutshell that's what I was doing except I had selected the option to include text in the thwate script generator. In doing so it seems to have been the cause of the error, I was copying the whole generated code into the TPL file but I suspect I needed to split their code, the script into the TPL file as you have done and the text part into the language file perhaps?

Anyway either way (I'm waffling!) it works just fine as is.
Thanks again Schoolboy!