Page 1 of 2 12 LastLast
Results 1 to 10 of 115

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Location
    Aurora, IN
    Posts
    37
    Plugin Contributions
    0

    Default Re: Facebook "Like" button on every product page?

    It puts the Like button there fine, and says that I "Like" it when I click it, but then it gives me an error message, and when I click on it, it says, "The page at http://mysite.com/index.php?main_page=product_info could not be reached."

    Any ideas how to fix that?


    Quote Originally Posted by niccol View Post
    On a product_info page that code will produce this in the html:

    Code:
    http://domain.com/index.php?main_page=product_info&cPath= 65 &products_id=181
    Or whatever the details are. It will produce that wherever you put it as long as it is not already in <?php ?> tags in which case you'd need to remove the ones in my code.

    So you could just put that code somewhere at the top of the page and you will see what it is outputing.

    What you actually want to do is this:

    Code:
    <iframe src="http://www.facebook.com/widgets/like.php?href=<?php echo zen_href_link(zen_get_info_page((int)$_GET['products_id']),'cPath= '.(int)$_GET['cPath'].' &products_id=' . (int)$_GET['products_id']); ?>"
            scrolling="no" frameborder="0"
            style="border:none; width:450px; height:80px"></iframe>
    But looking at it again I am not sure that the whole plan is going to work in that I am not sure the system will deal with the dynamic URL anyway. What that means is that I am not sure how the system will deal with the bit after the question mark. It might or it might not.

  2. #2
    Join Date
    May 2010
    Posts
    5
    Plugin Contributions
    0

    Default Re: Facebook "Like" button on every product page?

    It puts the Like button there fine, and says that I "Like" it when I click it, but then it gives me an error message, and when I click on it, it says, "The page at http://mysite.com/index.php?main_page=product_info could not be reached."

    Any ideas how to fix that?
    Last edited by myzcpt; 2 May 2010 at 02:48 PM.

  3. #3
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Facebook "Like" button on every product page?

    @kevinmc3
    Which browser are you using - looks fine in firefox.

  4. #4
    Join Date
    Jun 2006
    Posts
    783
    Plugin Contributions
    0

    Default Re: Facebook "Like" button on every product page?

    Quote Originally Posted by niccol View Post
    @kevinmc3
    Which browser are you using - looks fine in firefox.
    Using IE 8

  5. #5
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Facebook "Like" button on every product page?

    this is what it looks like in firefox - is this different or are you expecting something else....
    Attached Images Attached Images  

  6. #6
    Join Date
    Jun 2006
    Posts
    783
    Plugin Contributions
    0

    Default Re: Facebook "Like" button on every product page?

    Quote Originally Posted by niccol View Post
    this is what it looks like in firefox - is this different or are you expecting something else....
    Yes, looks cleaner in FF. It doesn't have a white box around the Like It button like in IE8.

    Another question. If there anyway to get the Like It posts to include an Image of the product? Like when we post on our Facebook "WALL" or "NOTES" , it pulls the image from the URL. Would be great if could get the Like IT code to ALSO pull the Image.

  7. #7
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: Facebook "Like" button on every product page?

    This and some of the rest of the thread is getting into issues with the facebook end of the thing. And I have to say that I know diddly squat about facebook....

    But maybe someone else has better knowledge than I

  8. #8
    Join Date
    Nov 2009
    Location
    Aurora, IN
    Posts
    37
    Plugin Contributions
    0

    Default Re: Facebook "Like" button on every product page?


    I changed my coding on the header page so that now the Like button works without giving me that error message. Go to this page, download the file, and then copy the facebook section to your header page, and it should work:

    http://www.zenflavor.com/add-faceboo...uct-pages.html

    Quote Originally Posted by myzcpt View Post
    It puts the Like button there fine, and says that I "Like" it when I click it, but then it gives me an error message, and when I click on it, it says, "The page at http://mysite.com/index.php?main_page=product_info could not be reached."

    Any ideas how to fix that?

  9. #9
    Join Date
    Sep 2009
    Posts
    49
    Plugin Contributions
    0

    Default Re: Facebook "Like" button on every product page?

    Here's what I did...I'm not sure if it's the best way, but it works!

    Do this at your own risk!!! Back-up all files first!

    in "includes\templates\YOUR_TEMPLATE\common\html_header.php"

    I placed this below the meta tag for "generator":
    Code:
    <?php if(strstr($_GET['main_page'], 'product_')) { ?>
        <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:type" content="product"/>
        <meta property="og:phone_number" content="ENTER PHONE NUMBER"/>
        <meta property="og:region" content="ENTER STATE CODE"/>
        <meta property="og:country-name" content="ENTER Country"/>
        <meta property="fb:admins" content="ENTER FB USERID"/>
    <?php } ?>
    Note that the above only works on product pages not document pages.

    There's also many more meta tags that FB recognizes it. Take a look at their developer resources for me info...
    http://developers.facebook.com/docs/opengraph

    in "includes\modules\meta_tags.php"

    Add the change in red to the query on (or around) line 200:

    Code:
    $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
    I've inserted the following code at line 284 (for me), between the following lines in blue:

    Code:
        } // CUSTOM META TAGS
        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
      break;
    And than follow the other instructions in this thread for editing tpl_product_info_display

    I hope this helps.

  10. #10
    Join Date
    May 2010
    Posts
    72
    Plugin Contributions
    0

    Default Re: Facebook "Like" button on every product page?

    I've tried changing my tpl_product_info_display.php file, as instructed, but nothing changed on my page. Why not?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Facebook "Like/Share" Plugin - Using OG info for each product?
    By rubiconpeak in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 14 Oct 2012, 12:08 AM
  2. 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
  3. Facebook "Like" button
    By wilson_li in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 28 Jul 2011, 08:29 PM
  4. Facebook "LIKE" button.
    By Tantirx in forum General Questions
    Replies: 7
    Last Post: 28 Apr 2011, 05:42 AM
  5. Replies: 26
    Last Post: 19 Feb 2010, 02:56 AM

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