How to Add the Facebook “Like” Button for TomatoCart

There are currently more than 500 million active users spending over 700 billion minutes per month on Facebook, according to Facebook’s own data.

To convert those users into customers, you can add a “Like” button with Facebook’s API.

It only takes a few minutes to tap into the Facebook community.

Step 1. Update Your Template’s Metadata

Firstly, you will want to include several lines of metadata in your page template.

Using a file manager tool in TomatoCart, you can easily add code. In the admin panel, go to Start->Tools->File Manager. On the left hand side, select the file you want to edit. To add metadata, we select templates/glass_gray/index.php

There are two Like button implementations: XFBML and Iframe. The XFBML version is more versatile, but requires use of the JavaScript SDK. It is best to use the XFBML approach. To add the button to a product’s info page, you need to edit the templates/glass_gray/content.products/info.php file:

Author Spotlight

Kemin Bao

As a php professional, I have much experience in open-source shopping cart solutions, such as tomatocart and opencart, and master the framework of tomatocart and opencart. Except php, I am also accomplished in the front-end technique, such as html, css and jQuery. I have built two templates websites for tomatocart and opencart, and made all templates in the websites, www.tomthemes.com and www.bestopencarttemplates.com .Now I am making plugins for tomaotcart, such as mega menu, ajax-login, ajax-register, facebook and etc.

8 Comments on How to Add the Facebook “Like” Button for TomatoCart

Using the code provided, I am having an issue with it generating the meta page title and store name. The button itself works great, and post to FB….just not getting the meta info with it. Any suggestions?

My spouse and I stumbled over here by a different page and thought I may as well check things out. I like what I see so now i am following you. Look forward to looking into your web page for a second time.