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.
thanks
6 answers
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="http://w.sharethis.com/button/buttons.js"></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"> </span> <span class="st_fblike_hcount"> </span> <span class="st_plusone_hcount"> </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($_product, nl2br($_product->getShortDescription()), 'short_description') ?></div>
<?php endif;?>
I hope this would help !
Thanks Sherlock!
Quick question… do i need to register with addshare and get my own publisher id?
Thanks Sherlock!
Quick question… do i need to register with addshare and get my own publisher id?
Yes, I think so,it’s better if you doing that
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.,
Hi jrod31,
you can try to follow this
1) Go to http://developers.facebook.com/docs/…/plugins/like/ and obtain the proper code for your site. (It will generate iframe HTML code that you need to copy)
2) Put the code at app\design\frontend\default\your_themetemplate\pa ge\html\header.phtml or app\design\frontend\default\your_themetemplate\pa ge\html\footer.phtml as you wished !
This question is now closed