Page 5 of 5 FirstFirst ... 345
Results 41 to 50 of 347

Hybrid View

  1. #1
    Join Date
    Oct 2007
    Location
    Emporia, Kansas
    Posts
    1,762
    Plugin Contributions
    0

    Default Re: Facebook Like Button

    Quote Originally Posted by lucamaz View Post
    Here is the link to my store: http://www.millecover.com/glitter-st...-celeste-p-155

    I've made some test and I understand why FB try to load "logo.png".
    It's my fault: I've put in the page header "meta property="og:image" setted on "logo.png".

    What is the "readme" file you writing about?

    In the zip you downloaded were the files to install this mod and there is a document called readme.txt in it is:

    Code:
    Instructions:
    
    
    
    Contains 3 files, all of which go into template override folders.
    
    
    
    includes/templates/your_custom_template/common/html_header.php
    
    includes/templates/your_custom_template/templates/tpl_product_info.php
    
    includes/modules/your_custom_template/metatags.php
    
    
    
    Edit 2 files:
    
    
    
    1) > includes/templates/your_custom_template/common/html_header.php
    
    
    
    Find this code (line 25):
    
    <meta property="fb:admins" content="184218714477"/>
    
    
    
    and enter your application id or admin user ids between the quotes.  For most people this will be the application id which is obtained by registering your app/site at Facebook: http://developers.facebook.com/setup/
    
    
    
    2) > includes/templates/your_custom_template/templates/tpl_product_info.php
    
    
    
    Find this code (line 22):
    
    FB.init({appId: 'your application id', status: true, cookie: true
    
    
    
    and enter your application id between the single quotes.
    
    
    
    
    
    
    
    Change "your_custom_template" to your template name. Upload each file to the appropriate folder.
    
    
    
    
    
    For more information on integrating Facebook with websites: http://developers.facebook.com/docs/guides/web


    and also:

    this for the earlier versions...I suppose you are using 1.3.9h or are you using 1.5 zencart...either way I use 1.3.9h and also added these lines to my file:

    Code:
    2) html_header.php
    
    Change the second line of the file to: <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>> to 
    
    <html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?> xmlns:fb="http://www.facebook.com/2008/fbml">
    
    
    
    Add this code
    
     <meta property="og:title" content="<?php echo META_TAG_FBTITLE; ?>"/>
    
        <meta property="og:site_name" content="<?php echo TITLE; ?>"/>
    
        <meta property="og:image" content="<?php echo META_TAG_FBIMG; ?>"/>
    
         <meta property="og:url" content="<?php echo $canonicalLink; ?>"/>
    
         <meta property="fb:admins" content="your_application_id or facebook admins"/>
    
        <meta property="og:type" content="product"/>
    
    
    
    anywhere before the </html> tag.  I added it after <meta name="author" content="The Zen Cart&trade; Team and others" />
    
    
    
    3) metatags.php
    
    Replace this code (line 210 in 1.3.8)
    
     $sql= "select pd.products_name, p.products_model, p.products_price_sorter, p.products_tax_class_id,
    
                                          p.metatags_title_status, p.metatags_products_name_status, p.metatags_model_status,
    
                                          p.products_id, p.metatags_price_status, p.metatags_title_tagline_status,
    
                                          pd.products_description, p.product_is_free, p.product_is_call,
    
                                          mtpd.metatags_title, mtpd.metatags_keywords, mtpd.metatags_description
    
    
    
    with this
    
    
    
     $sql= "select pd.products_name, p.products_model, p.products_price_sorter, p.products_tax_class_id, p.products_image,
    
                                          p.metatags_title_status, p.metatags_products_name_status, p.metatags_model_status,
    
                                          p.products_id, p.metatags_price_status, p.metatags_title_tagline_status,
    
                                          pd.products_description, p.product_is_free, p.product_is_call,
    
                                          mtpd.metatags_title, mtpd.metatags_keywords, mtpd.metatags_description
    
    
    
    4) metatags.php
    
    Add this code (line 293 in 1.3.8):
    
    
    
        //bof facebook like button
    
        if($product_info_metatags->fields['products_image']!='') {
    
            $FBimgURL = (($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_CATALOG : HTTP_SERVER . DIR_WS_CATALOG ) . DIR_WS_IMAGES . $product_info_metatags->fields['products_image'];
    
            define('META_TAG_FBIMG', $FBimgURL); 
    
        } else {
    
            define('META_TAG_FBIMG', '');
    
        }
    
        define('META_TAG_FBTITLE', str_replace('"','',zen_clean_html($product_info_metatags->fields['products_name'])));
    
        //eof facebook like button
    
    
    
    between this 
    
    
    
     } // CUSTOM META TAGS
    
    
    
    and this
    
    
    
      } // EOF
    
      break;


    I also added this additonal code to the file cause my store would not show the image if I just put the link into FB without using the button at the store cause it will show the images in my own account but not into our group account and now it does show it anywhere in FB I should post the link manually

    Code:
    <meta property="og:title" content="<?php echo META_TAG_TITLE; ?>"/>
    We all make mistakes when manually adding something so don't worry about that. I would compare the files mentioned to see if the code is something that might help...make duplicates to work with then just upload the good one back if it messed things up

    I did notice that in your source code you have the og:image content going to http://www.millecover.com/images/

    I dropped the images/ part on mine since I have Image Handler and it will use the folder where these are located. Maybe try taking it off yours --might be confusing the software?? not sure.

  2. #2
    Join Date
    Oct 2010
    Location
    ireland
    Posts
    23
    Plugin Contributions
    0

    Default Re: Facebook Like Button

    Using Zen 1.3.9h

    have a heap of varying addons installed...

    Love this addon, another great contribution...

    Had a strange issue with it once installed, it worked fine, but for some reason the product descriptions on product pages were doubled up ? i.e. duplicate descriptions of the product...

    Figured it was something to do the tpl_product_info_display
    and after a compare to my original file i deleted the code below from file to resolve the problem

    <!--bof Product description -->
    <?php if ($products_description != '') { ?>
    <div id="productDescription" class="productGeneral biggerText"><?php echo stripslashes($products_description); ?></div>
    <?php } ?>
    <!--eof Product description -->
    <br class="clearBoth" />



    it works now and i'm stoked..

    why i have no idea, do i care, not a bit

  3. #3
    Join Date
    Sep 2008
    Location
    North Highlands, California 95660
    Posts
    286
    Plugin Contributions
    1

    Default Re: Facebook Like Button

    you need to strip the html from the description tag try this fix.

    Change
    Code:
    <?php echo stripslashes($products_description); ?></div>
    to this:
    Code:
    <?php echo stripslashes(strip_tags($products_description)); ?>
    http://www.sidewalkstyles.com Comfort Footwear, Accessories and More.
    creinold SBA with Dynamic Drop Downs latest Alpha release: http://www.sidewalkstyles.com/creino...art_V1.5.0.zip

  4. #4
    Join Date
    Apr 2012
    Posts
    6
    Plugin Contributions
    0

    Default Re: Facebook Like Button

    Where could I get this add on?



    I like the new zen-cart forum layout.

 

 
Page 5 of 5 FirstFirst ... 345

Similar Threads

  1. Facebook like button
    By petestownrich in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 18 Feb 2015, 07:02 PM
  2. v151 facebook like button
    By ken1 in forum General Questions
    Replies: 0
    Last Post: 14 May 2014, 07:03 PM
  3. Facebook like button
    By bocahydro in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 5 Mar 2014, 01:48 PM
  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
    By rdsbaker in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 25 Mar 2011, 07:00 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