How to add social media button (eg FB, Twitter) to each single product page in JM Scerif?
Just like JM Lingerie (see attachment).
1 answer
Hi victorlai,
Firstly you would need to create an sharethis account here http://sharethis.com/createaccount then follow below steps
1) You open the template file of app\design\frontend\default\jm_lingerietemplate\c atalog\product\view.phtml to add a html mockup like this
HTML Code:
<div class="social"> <span class='st_facebook' displayText='Facebook'></span> <span class='st_linkedin' displayText='LinkedIn'></span> <span class='st_twitter' displayText='Tweet'></span> <span class='st_sharethis' displayText='ShareThis'></span> <span class='st_email' displayText='Email'></span> </div>
Then open the file app\design\frontend\default\jm_lingerietemplate\p age\html\head.phtml to add this
HTML Code:
<script type="text/javascript">var switchTo5x=true;</script> <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> <script type="text/javascript">stLight.options({publisher: "your Publisher ID", doNotHash: true, doNotCopy: true, hashAddressBar: false});</script>
Notice here the your Publisher ID should be replaced by your actual Publisher ID that you get after create an account.
Hope this helps !