To create a Facebook share button on every productpage in magento you just have to add
this code in your view.phtml.
app/design/frontend/theme/theme/template/catalog/product/view.phtml
1 2 3 4 5 6 7 |
<a name="fb_share" type="button"></a> <script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script> <?php if($_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; ?> <?php $_product = $this->getProduct(); ?> <script type="text/javascript"> |
This is an easy way to add create your own facebook share button for magento.
Let me know I have update my site list.phtml using this but , only one product take this button rest of products in not appear this why? what is the issue.
Mmmm, have you already solved the problem or do you still need some help?