Faster than eCommerce

NoCoast's Company Blog

Add Facebook Like on a product page in Magento

Facebook

Today’s Quick and Easy Magento Tip, is Adding a FaceBook Like button to any product page in Magento. ¬†This is a basic form of social integration that would allow prospective buyers, and other visitors, to share the product page with their followers on Facebook. ¬†Added sharing can equal increased expsoure and a huge return on something that is quick and easy.

To add this button, add the following code anywhere in this template file:app/design/frontend/theme/theme/template/catalog/product/view.phtml


<a name=”fb_share” type=”button”></a>
<script src=”http://static.ak.fbcdn.net/connect.php/js/FB.Share” type=”text/javascript”>
</script>
<?php elseif($_share == ‘facebook_like’): ?>
<script src=”http://connect.facebook.net/en_US/all.js#xfbml=1″></script><fb:like show_faces=”true” width=”450″></fb:like>
<?php endif; ?>


 

 

Leave a reply

Your email address will not be published. Required fields are marked *

Need help? Email Us Here! Chat With Us Now!

← Prev Step

Thanks for contacting us. We'll get back to you as soon as we can.

Please provide a valid name, email, and question.

Powered by LivelyChat
Powered by LivelyChat Delete History