Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jan 11, 2012 @ 14:24
    Bjarne Fyrstenborg
    0

    Facebook like button on product page

    Hi..

    I have tried to insert a Facebook like button on the product page, but when changing variant or currency I need to update the script in javascript.

    Right after body start tag I have this:

    <div id="fb-root"></div>
    <script>(function(dsid{
      var jsfjs d.getElementsByTagName(s)[0];
      if (d.getElementById(id)return;
      js d.createElement(s)js.id id;
      js.src "//connect.facebook.net/da_DK/all.js#xfbml=1";
      fjs.parentNode.insertBefore(jsfjs);
    }(document'script''facebook-jssdk'));</script>

    added the namespace xmlns:fb="http://ogp.me/ns/fb#" in the xslt file and this line too: 

    <fb:like send="true" width="450" show_faces="true"></fb:like>

    Do you know how to solve this?

    I also need to get the right image of the product or variant.. where I need to add something like <meta property="og:image" content="http://sitename.dk/productImage.jpg"/> .. can I add this dynamically from the product_product.xslt file?

    Bjarne

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Jan 11, 2012 @ 14:27
Please Sign in or register to post replies

Write your reply to:

Draft