How to add Facebook Like buttons to Magento Go product pages
Recently a client of ours asked if we could add a Facebook Like button to all of the products on their Magento Go site, the idea being that when the button was pressed it would then add the link to that particular product to their Facebook page.
In Magento Community this wouldn’t be too much of a problem, however this particular site is a Magento Go store which doesn’t have the same amount of customisability or extensions. A quick search of the Magento Go documentation brought up a page showing how to add social networking links to Magento Go through a static block, but no reference to what code would be needed to actually connect to Facebook.
The code supplied by Facebook themselves requires placing code in sections of the page not available to edit in Magento Go, so things looked to have come to a stand still. However, through a bit of perseverance and good old Google, we came across 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>
Then, by following the previously mentioned Magneto Go guide to adding social networking buttons, we created a static block that would show on every product page, allowing users of the site to “like” individual products, driving more traffic to the site.
The above code was added to Github by an anonymous user at the following link.
Posted on
| Permalink to this comment
Posted on
| Permalink to this comment
Posted on
| Permalink to this comment
Posted on
| Permalink to this comment
Posted on
| Permalink to this comment
Posted on
| Permalink to this comment
Posted on
| Permalink to this comment
Posted on
| Permalink to this comment
Posted on
| Permalink to this comment
Posted on
| Permalink to this comment