Jump to content
ipresta

Comment adapter le bouton facebook "j'aime" pour prestashop

Recommended Posts

Comment faire fonctionner le code ci-dessous pour prestashop 1.3 ?
 
 
<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/fr_FR/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
 
 
<div class="fb-like" data-href="https://developers.facebook.com/docs/plugins/" data-layout="standard" data-action="like" data-show-faces="false" data-share="true"></div>
 
 

Merci

Share this post


Link to post
Share on other sites

La première partie du code est a intégrer dans le header.tpl avant <body >

 

<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/fr_FR/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

 

et la seconde partie dans le product.tpl

 

<div class="fb-like" data-href="https://developers.f...m/docs/plugins/" data-layout="standard" data-action="like" data-show-faces="false" data-share="true"></div>

 

(A changer data-href)

 

Mais cette solution prescrite par facebook donne une page produit blanche sur prestashop

1.3 par contre cela fonctionne sur prestashop 1.4

 

Donc comment l'adapter pour 1.3 ?

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More