|
How to create Google+ badge Want to create own google plus badge widget exactly the same as you can see on the left hand side here? Read this free tutorial. I will show you step by step how easily you can create own google plus badge. I willl use our free html block prestashop module. This awesome addon allows you to use any code you want in most important places (hooks) in PrestaShop store.
As always I want to say, that you have to install html block module first in your back office. It is necessary because without this module it will be hard to use this widget (You will need to edit the template files), with this addon it will be very easy. |
Google+ widget code
Here is the widget code for our Google+ profile. Of course if you want to use widget for own profile - you have to change several variables in the code below. I will show you step by step what to change.
<!-- Place this tag where you want the widget to render. --> <div class="g-page" data-width="200" data-href="//plus.google.com/116184657854665082523" data-rel="publisher"></div> <!-- Place this tag after the last widget tag. --> <script type="text/javascript"> window.___gcfg = {lang: 'en-GB'}; (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>
Most important variables in the code
You can also define own widget code on page: Google+ widget code generator. Ok, so I suppose that you've got now own valid Google+ badge widget code. So please follow instruction below.
Html block and widget code
Now it is time to use the widget code in html block module. Open your modules tab in your back office and search for html box module. This is how the module looks like in your BO.
html block free presatshop module in back office
Click on configure button and you will see the module configuration page
From the left hand side column select the position where you want to put the widget. I selected left column, so it mean that widget will appear in the main left column of your store. Now paste the code to the field in the right hand side column and hit Save Settings button. That's all, your widget will appear in your front - end.
This tutorial will work also in old prestashop versions like 1.2, 1.3, 1.4