Add Facebook ‘Like’ button to your Zen Cart product pages

May 3, 2010 in Zen Cart Customization, Zen Cart Guides

Is this useful? Like it.

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.

Facebook Like button on product page

Facebook Like button on product page

Steps

  1. 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 and 1.3.9f.
  2. 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)

Facebook code at line 19

Facebook code at line 19

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:

  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 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

Premium Zen Cart templates from $22 only. Guaranteed unbeatable value! Give your business an advantage over others! Click to see now!

Bookmark and Share

Comments

Leave a Reply




Premium Templates

Premium 1 Series ($22~25)

Premium 2 Series ($26)

Premium 3 Series ($29)

Premium 4 Series ($28)

Premium 5 Series ($30)

Premium 6 Series ($30)

Premium 7 Series ($35)

Premium 8 Series ($40)