More than 1000+ satisfied clients and counting, since 2010

Blog

Add Facebook Like Button in Magento in Easy Steps

Add Facebook Like Button in Magento Stores

Add Facebook Like Button in MagentoMagento content management system allows its customers to share their products with friends. Using the Facebook like button you can recommend the product to your friends. This tutorial will cover how you can add Facebook like button in Magento stores in easy steps.

But basically if you wish to add Facebook like button in Magento shopping cart, then you have to first create a static block to accommodate the widget. You need to follow 2 steps to add Facebook like button in Magento:

  • Create a static block to add Facebook like button in Magento
  • Create a widget to add Facebook like button in Magento

Create a Static Block to Add Facebook Like Button

Follow the steps to create a static block where you can add Facebook like button:

  • Log in to the Admin Panel after entering correct credentials
  • Select CMS > Static Blocks
  • Click ‘Add New Block’ from Static Blocks management page
  • Define all the required fields: Block Title, Identifier, Store View, and Status
  • Click ‘Show/Hide Editor’ to disable WYSIWYG editor
  • Paste the code provided by Facebook’s Developer documentation in Content section
  • Paste the following code:

<script type=”text/javascript”>
var likeIt = ‘<iframe src=”http://www.facebook.com/plugins/like.php?href=’+document.URL+'” scrolling=”no” frameborder=”0″ style=”border:none; width:450px; height:80px;”></iframe>’;
document.write(likeIt);
</script>

  • Click ‘Save Block’ to save the changes made

Create a Widget to Add Facebook Like Button

Follow the steps to create and customize the widget to add Facebook like button in Magento:

  • In Admin Panel, Select CMS > Frontend Apps
  • From Manage Frontend Apps page, click ‘Add New Frontend App’
  • Select CMS Static Block in settings and click ‘Continue’
  • Enter the name of this frontend app in ‘Frontend App Title’
  • Set the sort order in its respective field
  • Click ‘Add Layout Update’
  • Set ‘Display On’ to all pages
  • Choose ‘Block Reference’ to fit your layout needs
  • Click ‘Frontend App Options’
  • Click Select Block’ to choose the CMS static block
  • Click ‘Save’ to save the changes made

If you are unable to add Facebook like button in your Magento store, then Request a Quote. Our Magento support team will assist you in adding the Facebook like button in your online Magento run store.

Written by

The author didnt add any Information to his profile yet