1

So i want to add the pintrest and G+ icon to the RWD package on the , i am guessing it will involve adding some code to sharing.phtml in the rwd directory? and something in the skin as well as the style sheet. I know my way around magento but could use some help. As i said I am looking for very detailed instructions to accomplish this task. Thanks in advance. enter image description here

1 Answer 1

1

It's very simple. In rwd theme.

Step 1: Open this folder app\design\frontend\rwd\default\template\catalog\product\view.

Step 2: Find sharing.phtml file.

Step 3: Add new li tag at last as below.

<li>
   <a href="//www.pinterest.com/pin/create/button/?url=<?php echo $_productUrl;?>" data-pin-do="buttonPin" data-pin-shape="round" target="_blank" title="<?php echo $this->__('Share on pinterest') ?>"><img src="//assets.pinterest.com/images/pidgets/pinit_fg_en_round_red_16.png" /></a>
</li>

Ste 4: At last Please call pinit.js only once per page

<script type="text/javascript" async src="//assets.pinterest.com/js/pinit.js"></script>

Step 5: Now for Google Plus.

<!-- Place this tag where you want the share button to render. -->
<div class="g-plus" data-action="share" data-annotation="none" data-height="15" data-href="<?php echo $_productUrl;?>"></div>

Step 6: Please add below code.

<!-- Place this tag in your head or just before your close body tag. -->
<li>
   <script src="https://apis.google.com/js/platform.js" async defer></script>                   
</li>

Step 7:** Save file refresh cache.

Let me know if any comments.

Note:: If Button is not display Proper then we have to set CSS by Own.

4
  • I will update google + by tomorrow morning
    – Keyul Shah
    Commented Sep 18, 2014 at 18:21
  • So I am not sure if this matters these will be on only product pages and i put the JS scripts in the Miscellaneous Scripts head section in the admin? i am confused as to why you have the <li> for the js script too. so it looks as though i need to set the css as the buttons are touching just need some padding i think please advise, i am learning still , i have to ask. Thanks in advance
    – Snowjockey
    Commented Sep 20, 2014 at 5:48
  • U can do one thing add js file on only in product detail page don't add in li tag.
    – Keyul Shah
    Commented Sep 20, 2014 at 11:25
  • You can do one thing just add two button on site share link with us I will then give suggestion for csss
    – Keyul Shah
    Commented Sep 20, 2014 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.