It is fast and easy to add the Facebook ‘Like’ button to all your product info pages. This ‘Like’ button is part of the new Facebook widgets or Social Plug-ins.
The only Zen Cart file involved is the tpl_product_info_display.php file — and you do not need to do any editing, just get the file from here.
Steps
- Click here to download the tpl_product_info_display.php for Zen Cart 1.3.8, 1.3.9a and 1.3.9b.
Click here to download the tpl_product_info_display.php for Zen Cart 1.3.9c, 1.3.9d, 1.3.9e, 1.3.9f, 1.3.9g and 1.3.9h.. - Unzip and save the file to your computer, then upload to:
\includes\templates\CUSTOM_TEMPLATE\templates\
Where CUSTOM_TEMPLATE is the folder name of the current template you are using.
Important note
If you already have the tpl_product_info_display.php file in your custom template’s folder, DO NOT overwrite your file. You need to manually add the Facebook code to your file. Just open the file downloaded from here, copy line 19 (the whole section of the “iframe” code), then paste to your file at about the same line location.
If you use any of our premium template, then you do not have to worry about this, just follow the STEPS section above. (unless you have separately installed any module that modifies the tpl_product_info_display.php file)
Customization
The Facebook plug-in code added to the Zen Cart file was obtained from Facebook(have a look, but you do not need to get the code from there).
As you can see from the code screenshot above, there are a few parameters that you may want to change:
- show_faces=false — Change to true if you want the widget to display the thumbnail photos of those who have ‘liked’ your product.
- colorscheme=light – Change to dark if your page is dark in color.
- height:40px — This was arbitrarily choosen. If you choose to display ‘faces’, then you should increase the height of the widget (80px or more).
Compatibility: Zen Cart 1.3.8, 1.3.9a/b/c/d/e/f/g/h
Comments
Post a Comment