CAll Us: +1 888-999-8231 Submit Ticket

Add Facebook Like Button to Magento Product View

Add Facebook Like Button to Magento Product View
It seems that every site you visit has a link to share this article, page or product with your Facebook friends. This tutorial will make it easy for your customers to share your products with their Facebook friends. For this article I will use the Magento default theme as reference, you may need to adjust your code slightly if you use a custom theme.

We will simply add the Facebook like button to your product view page. With your favorite text editor, I like Notepad++ , open /app/design/frontend/base/default/template/catalog/product/view.phtml and around line 50 find the following code:
[code language=”html”]

[/code]

Place the following code on a new line below:
[code language=”html”]

[/code]

That block of code should look something like this:
[code language=”html”]

[/code]

Refresh your product view page and you should see the like button. If you don’t see the change, you may need to refresh the Blocks HTML output cache in System > Cache Management.
Facebook Like Button

Yea, it’s as easy as that!

Source link

About the Author