Adding social media button

how can i add social media share buttons in every product page.
several people have told me not to use sharethis because it has a trace code or back links….

please help.


6 answers

Profile photo of Sherlock 0.00 $tone September 12, 2013

Hi jrod31,

You can follow those steps to add social media buttons to product detail page
1) Go to your back-end, create a static block with block’s Identifier is addshare and put the below to it’s content

HTML Code:

<script type="text/javascript" src=""></script>
<script type="text/javascript">// <![CDATA[
stLight.options({publisher: "be87d52a-d9cd-4453-b4b1-3169c6f28e3d", doNotHash: false, doNotCopy: false, hashAddressBar: false});
// ]]></script>
<div class="share-buttons"><span class="st_pinterest_hcount">&nbsp;</span> <span class="st_fblike_hcount">&nbsp;</span> <span class="st_plusone_hcount">&nbsp;</span></div>

2) You open the template file of app\design\frontend\default\jm_mozanistemplate\ca talog\product\view.phtml add this line of code

PHP Code:

 <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('addshare')->toHtml() ?>

To below the block

PHP Code:

 <?php if ($_product->getShortDescription()):?>
                <h4><?php echo $this->__('Quick Overview'?></h4>
                <div class="short-description"><?php echo $_helper->productAttribute($_productnl2br($_product->getShortDescription()), 'short_description'?></div>
            <?php endif;?>

I hope this would help !

Profile photo of Jeancarlos Rodriguez 270.00 $tone September 21, 2013

How can i add a facbook like page button on the home page.
Probably on the top or bottom of the search button.
But it needs to be for people to like our facebook page… not like the product like button.,


This question is now closed

Written By