Jayman11 Posted September 29, 2011 Posted September 29, 2011 I have been trying to get my +1 button to work forever. If I use the supplied code from google I see the button and can click on it and a pop up appears with my G+ name and comment box. But then it disappears within a couple seconds and I see a red exclamation mark on the +1 icon. Here is the code I am using: In my column_right.php: <g:plusone size="small" annotation="bubble" href="www.myurl.com"></g:plusone> In my footer.php: <script type="text/javascript"> (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); </script>
Peper Posted September 29, 2011 Posted September 29, 2011 In e.g. catalog/product_info.php add before </head> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> and e.g. where the button must display look for if ($product_info['products_price']>0) { and ad like below e.g. <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?> <g:plusone></g:plusone></td> </tr> <?php if ($product_info['products_price']>0) { Getting the Phoenix off the ground
Recommended Posts
Archived
This topic is now archived and is closed to further replies.