Forums / All Other Contributions/Addons / Adding the Goolge +1 button to product pages

Adding the Goolge +1 button to product pages

Views: 1,522

Results 1 to 3 of 3
16 Jul 2011, 6:01 AM
#1
lorrie avatar

lorrie

New Zenner

Join Date:
Aug 2007
Posts:
60
Plugin Contributions:
0

Adding the Goolge +1 button to product pages

Hi

I would like to add the google +1 button to my product pages. It need to add some text to the <head></head> where is this located?

Many thanks for your help.

21 Jul 2011, 6:29 AM
#2
williewontgo avatar

williewontgo

New Zenner

Join Date:
Oct 2009
Location:
New York, USA
Posts:
70
Plugin Contributions:
0

Re: Adding the Goolge +1 button to product pages

This is what I did. Perhaps someone knows of an easier or better way.

Once you get the code (here), you place the script part right before the </head> tag on the html_header.php page within the

/includes/templates/YOUR TEMPLATE/common

directory. Next place the gplusone code wherever you want on the tpl_info_product_display.php page within the

/includes/templates/YOUR TEMPLATE/templates

directory. Good luck. :)

23 Jul 2011, 5:07 AM
#3
nfm avatar

nfm

New Zenner

Join Date:
Jan 2008
Posts:
90
Plugin Contributions:
0

Re: Adding the Goolge +1 button to product pages

I've found a site that has a great set up that adds not only the +1 but the Tweet, Facebook Like, Google Buzz, and Stumble Upon buttons.

Step 1

In Add the following line of code to your includes/templates/common/html_header.php
directly following <?php } //endif FAVICON ?>

<script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script>

Step 2

Then, in your product pages (this is really the best place for them) add the
following, styled however you like.

<g:plusone size="tall"></g:plusone> <a title="Post to Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="normal-count"></a><script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script> <a href="http://twitter.com/share" class="twitter-share-button" data-count="vertical">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like layout="box_count" font="verdana"></fb:like> <script src="http://www.stumbleupon.com/hostedbadge.php?s=5"></script></span>

That's it... Socially up to speed.

Here is the text file showing this as well from the original site...credit due to them.

http://pro-webs.net/docs/plus1.txt