Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007
    Location
    MA, USA
    Posts
    385
    Plugin Contributions
    0

    Default Where does the Facebook Like button code go?

    Where does the Facebook Like button code go within Zen Cart?

  2. #2
    Join Date
    Jun 2004
    Location
    Northern Rivers, NSW
    Posts
    159
    Plugin Contributions
    0

    Default Re: Where does the Facebook Like button code go?

    I answered this in the Templates, Stylesheets, Page Layout forum (it should have shown up if you'd searched 'Facebook'), but I'll answer it here again.

    On includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php copy and paste the following and insert it directly after the <body> tag.
    Code:
    <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";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
    Place the code for your plugin wherever you want the Like button to appear on your page.
    Code:
    <div class="fb-like" data-href="YOUR URL" data-width="450" data-layout="standard" data-action="like" data-show-faces="false" data-share="true"></div>
    That code gives you a Like and Share button plus how many people 'like' it.

    There are other codes you can get from Facebook Like Button to do what you want. I use individual links on my product pages so people can Share and Recommend specific products on their Facebook. It's a little more involved, but worth it for me.


    I don't use the Like button at all because Like doesn't get me free advertising of my products on Facebook, it's basically just a counter

 

 

Similar Threads

  1. Facebook like button
    By bocahydro in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 5 Mar 2014, 01:48 PM
  2. where to find the code that does the radio button?
    By denniszc in forum General Questions
    Replies: 9
    Last Post: 8 Apr 2013, 12:45 PM
  3. Facebook "Like" Button on each product page - where to add FB details?
    By Yaro in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 6 Jun 2012, 11:26 AM
  4. facebook like button and google + button in Header.
    By Horrific_ending in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 4 Jan 2012, 04:46 PM
  5. Facebook Like Button does not work on IE
    By DigitalGuard in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 16 Nov 2010, 05:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg