I'm using zen cart 1.3.9 (latest at time of post)

I ran into this error when adding the facebook like button to our header - and with the help of a good friend, found a workaround which is very simple, and commonly used procedure:

In INCLUDES/TEMPLATES/(yourtemplate)/COMMON/header.tpl
(in my case at least, I wanted to add the button next to the header, under the login, customization will be required for your solution.)

look for
<!--bof-branding display-->
<div id="logoWrapper">
<div id="logo"><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">' . zen_image($template->get_template_dir(HEADER_LOGO_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . HEADER_LOGO_IMAGE, HEADER_ALT_TEXT) . '</a>'; ?>

Under this statement - I included some new php which recognizes the http or https state of the page we are on - and if on secure pages, displays an image instead of the facebook like button, dispelling the non secure elements from account pages, but displaying the facebook like button on the home and other http request pages.


<!--bof-facebook like button/secure image-->
<?php
if ($_SERVER['HTTPS']) { ?>
<img src="https://opticalnow.ca/secure.jpg">
<?php
}else{?>
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.opticalnow.ca&amp;layout=standard&amp;show_faces= false&amp;width=200&amp;action=recommend&amp;font=arial&amp;colorscheme=light&am p;height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:200px; height:35px;" allowTransparency="true"></iframe>
<?php;
}?>
<!--eof-facebook like button/secure image-->

You will of course, need to modify this to suit your needs - I used a hard link to image over https, which I'm sure could be improved on, but works for what it is intended for. You will also need to change the facebook source code (everything in iframe)

this little script is to direct user's attention to the locked icon at the bottom of the browser, and confirm that the page is secure.