innocuous Posted December 4, 2012 Share Posted December 4, 2012 Hi, Anyone knows code or free module for Facebook like button and/or social sharing buttons which works with PS 1.5.2? None of the codes found/free modules are working properly Thanks Link to comment Share on other sites More sharing options...
SahinSOLMAZ Posted December 4, 2012 Share Posted December 4, 2012 Hi, Here goes: Have looked at? Please, here look or here look. Link to comment Share on other sites More sharing options...
innocuous Posted December 4, 2012 Author Share Posted December 4, 2012 (edited) Hi shnsimz, I've seen both the modules The first link is compatible upto PS 1.4. The second links adds a Like box to footer/header etc. It is not for individual product pages. I want simple "like" button with count. Edited December 4, 2012 by innocuous (see edit history) Link to comment Share on other sites More sharing options...
Carolina Custom Designs Posted December 4, 2012 Share Posted December 4, 2012 I want simple "like" button with count. In that case could you not just grab the code from FB and insert it into your product.tpl. This would add a 'like' button to every product page. Marty Shue Link to comment Share on other sites More sharing options...
innocuous Posted December 4, 2012 Author Share Posted December 4, 2012 Hi Marty, Tried doing that...problem is it doesn't post to FB. Like count increases but doesn't post on user timeline or anywhere else for that matter. This is what I added to product.tpl (this is for most popular social networks) None of them are working. --------------------------------------------- IN head section <!-- Pinterest js file --> <script type="text/javascript" src="//assets.pinterest.com/js/pinit.js"> </script> <!-- Google +1 js file --> <script type="text/javascript"> window.___gcfg = { lang: 'en-US' }; (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> <!-- Twitter js file --> <script> !function(d,s,id){ var js,fjs=d.getElementsByTagName(s)[0]; if(!d.getElementById(id)){ js=d.createElement(s); js.id=id; js.src="//platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js,fjs); } }(document,"script","twitter-wjs"); </script> <!-- Facebook js file --> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=220483648084612"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> -------------------- AND CODE WHERE I WANT BUTTONS TO DISPLAY <div style="height:30px;margin-top:5px;display:inline-block"> <!-- Facebook like button --> <div style="float:left; margin-right:20px"> <div class="fb-like" data-href="{$link->getProductLink($product->id, $product->link_rewrite)}" data-send="false" data-layout="button_count" data-width="100" data-show-faces="true"></div> </div> <!-- Pinterest Pin it button --> <div style="float:left; margin-right:20px"> <a href="http://pinterest.com/pin/create/button/?url={$link->getProductLink($product->id, $product->link_rewrite)}&media={$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}&description={$product->name|escape:'htmlall':'UTF-8'}" class="pin-it-button" count-layout="horizontal" always-show-count="true"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="Pin It" /></a> </div> <!-- Google +1 button --> <div style="float:left"> <g:plusone href="{$link->getProductLink($product->id, $product->link_rewrite)}" size="medium"></g:plusone> </div> <!-- Twitter tweet button --> <div style="float:left"> <a href="https://twitter.com/share" class="twitter-share-button" data-lang="en" data-url="{$link->getProductLink($product->id, $product->link_rewrite)}" data-text="{$product->name}">Tweet</a> </div></div> -------------------------------- Link to comment Share on other sites More sharing options...
yaniv14 Posted December 4, 2012 Share Posted December 4, 2012 (edited) try to add meta tag for facebook opengraph in header. <meta property="og:title" content="{$product->name|escape:'htmlall':'UTF-8'}" /> <meta property="og:image" content="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large')}" /> <meta property="og:description" content="{$meta_description|escape:html:'UTF-8'}" /> <meta property="og:type" content="product" /> <meta property="og:url" content="http://{$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}" /> <meta property="og:site_name" content="Your Site Name" /> Also above the <head> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#" xml:lang="{$lang_iso}"> Edited December 4, 2012 by yaniv14 (see edit history) 1 Link to comment Share on other sites More sharing options...
bbouhuis Posted January 23, 2014 Share Posted January 23, 2014 does anyone found a good module or a good working solution?? Link to comment Share on other sites More sharing options...
carlosmaba Posted December 28, 2014 Share Posted December 28, 2014 Hi everyone! I would like to put the button between the description and the price in all product tabs (with prestashop standard template). How can I do it? I tried it in all module positions but didn't work. Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts