With the latest trend in using social marketing it is almost a must to make your site as socially enabled as possible! The LIKE button by Facebook is a must have if you want your products to get shared and noticed and is pretty easy to integrate into your Zen Cart product page.
Via FTP you will need to download your tpl_product_info_display file which should be in your \includes\templates\YOUR CUSTOM TEMPLATE\templates folder, where YOUR CUSTOM TEMPLATE is the name of your custom template folder. If you do not see it in there, then download the version at \includes\templates\template_default\templates.
Once you download the file open it with a text editor such as Wordpad or Notepad (do not use Word or any other word processing software!)….then insert the following code where you want the LIKE button to appear.
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(zen_href_link(zen_get_info_page((int)$_GET['products_id']),'cPath='.(int)$_GET['cPath'].'&products_id=' . (int)$_GET['products_id'])); ?>&layout=standard&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:40px"></iframe>
Then save the file and re upload it to \includes\templates\YOUR CUSTOM TEMPLATE\templates folder, where YOUR CUSTOM TEMPLATE is the name of your custom template folder.
In the sample image shown below the above code was placed just above this piece of code in the tpl_product_info_display.php file so the LIKE button would appear above the product title:
<!--bof Product Name-->
<h1 id="productName"><?php echo $products_name; ?></h1>
<!--eof Product Name-->
You can change a couple of things if you need to!
1. show_faces=false — Change to true if you want the widget to display the thumbnail photos of those who have ‘liked’ your product.
2. colorscheme=light – Change to dark if your page is dark in color.
3. height:40px — This was arbitrarily chosen. If you choose to display ‘faces’, then you should increase to height of the widget (80px or more).
We have personally tested this on Zen Cart versions 1.3.8 and 1.3.9b and it works with both.