Google+ +1 Button

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
illyrianmoon
Ensign (ENS)
Ensign (ENS)
Posts: 17
Joined: Thu Apr 07, 2011 4:31 pm

Google+ +1 Button

Post by illyrianmoon » Fri Sep 09, 2011 1:30 pm

Has anyone successfully integrated the +1 Button for Google+? I tried putting the code in the scriptlet and also tried using an iframe tag in a ConLib file (like the Facebook widget), and each time it was buggy and showed up, but refused to work. Anyway, it's not vital or anything. I know Google+ has yet to take off in many circles, but we are trying to get a jump on the social networking stuff.

euroluxantiques
Commander (CMDR)
Commander (CMDR)
Posts: 118
Joined: Sat Dec 20, 2008 11:27 pm

Re: Google+ +1 Button

Post by euroluxantiques » Wed Sep 14, 2011 4:34 pm

I've gotten it to work. I put this in my Standard Header scriptlet within the <HeaderData> tags:

Code: Select all

<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>
Then I created a ConLib called "FacebookLike" (because I had already setup the Facebook stuff before) and added this into that ConLib:

Code: Select all

<div id="PlusOne">
            <g:plusone annotation="inline"></g:plusone>
        </div>
I then referenced the ConLib in my right sidebar scriptlet. It seems to work fine. You can get custom scripts and PlusOne stuff you need for your individual setup here:

http://www.google.com/webmasters/+1/button/

Post Reply