Page 34 of 35 FirstFirst ... 2432333435 LastLast
Results 331 to 340 of 347
  1. #331
    Join Date
    Jun 2009
    Posts
    275
    Plugin Contributions
    0

    Default Re: Facebook Like Button

    Hello,

    (using 1.5) I have been searching around but I can't seem to find a complete answer (at least not one that I understand) so if this is posted/answered elsewhere, apologies.

    I have this installed, and seems to work fine with the exception that I do not get pictures on my FB page after liking a product, just a link to the product page, nothing else. Any help would be great!

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

    Default Re: Facebook Like Button

    Quote Originally Posted by doooomed View Post
    Hello,

    (using 1.5) I have been searching around but I can't seem to find a complete answer (at least not one that I understand) so if this is posted/answered elsewhere, apologies.

    I have this installed, and seems to work fine with the exception that I do not get pictures on my FB page after liking a product, just a link to the product page, nothing else. Any help would be great!
    A link to your store would help a lot and save guess work

    Did you do these edits:

    1) tpl_product_info.php

    look afor this at the top of the page:

    //require(DIR_WS_MODULES . '/debug_blocks/product_info_prices.php');
    ?>
    <div class="centerColumn" id="productGeneral">

    Add this code after it
    <!-- bof Facebook Like Button -->
    <div id="likeButton"><fb:like></fb:like></div>

    <div id="fb-root"></div>
    <script>
    window.fbAsyncInit = function() {
    FB.init({appId: 'your application id', status: true, cookie: true,
    xfbml: true});
    FB.Event.subscribe('edge.create', function(href, widget) {
    // Do something, e.g. track the click on the "Like" button here
    });
    };
    (function() {
    var e = document.createElement('script');
    e.type = 'text/javascript';
    e.src = document.location.protocol +
    '//connect.facebook.net/en_US/all.js';
    e.async = true;
    document.getElementById('fb-root').appendChild(e);
    }());
    </script>
    <!-- eof Facebook Like Button -->
    after
    <div class="centerColumn" id="productGeneral"> at the top of the file


    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.

    *** this is how mine looks:<meta property="og:title" content="<?php echo META_TAG_FBTITLE; ?>"/>
    <meta property="og:title" content="<?php echo META_TAG_TITLE; ?>"/>
    <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="og:type" content="product"/>
    <meta property="fb:admins" content="app_id_here"/> ***


    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;

    also I have this code added and am able to have image go up when link is clicked too:

    place it in tpl_product_info_display.php also which I put after <!--eof Product Price block -->

    <script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolb ar=0,status=0,width=626,height=436');return false;}</script><style> html .fb_share_link { padding:2px 0 0 20px; height:32px;) no-repeat top left; }</style><a href="http://www.facebook.com/share.php?u=<?php echo "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING'];?>" onclick="return fbs_click()" target="_blank" class="fb_share_link"><img src=http://fantasiesrealm.com/images/facebook.gif width=25><font size=+2>&nbsp;&nbsp;Share on FaceBook: &nbsp;<strong><?php echo $products_name; ?></strong></a></font><br/><br/><br/><br/>

    ***all the <br/> are there by me fo spacing on my template you can go to my store to look where I have my FB link at in product pages...so those can be removed.***

    hope this helps

  3. #333
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Facebook Like Button

    That metatags stuff in the html_header is where it makes sure the product image is being pulled. So that and the metatags.php file are the 2 important things there.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

  4. #334
    Join Date
    Jun 2009
    Posts
    275
    Plugin Contributions
    0

    Default Re: Facebook Like Button

    Hi Delia,

    I forgot to mention that I am only using "product music" so I am editing tpl_product_music_info_display.php instead of tpl_product_info_display.php

    Would I need to alter any of the other files to reflect this? I ask because I've gone through this three times and still not working!

  5. #335
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Facebook Like Button

    No, shouldn't make a difference. I'm seeing some oddities here and there though. Why don't you pm me - or post a url if you want. Sometimes I find that it works for others when it doesn't work for your self. After all it is Facebook we are talking about and those folks love playing with their code and making changes. (Really, I heard a Facebook employee speak about this at a conference last Feb).
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

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

    Default Re: Facebook Like Button

    Not sure if this is a bug that attacked my FB button mod but......here is my query this time.

    I swear that at one time no matter where I used the FB button (at store and have a mod for smf in forum too) but I used to submit link (or click like button) and it would go straight to my page on FB. It would show what I was posting and I could edit it to the way I wished A N D I could choose which image to use from an array of them (the little arrows that the box has)....not anymore

    Now when I post a link everything works as it should but I am only left with the primary image, no longer does it show all images available.

    Ideas on what may be the problem?

  7. #337
    Join Date
    Dec 2012
    Location
    960 MARKHAM ROAD, APPT # 1101, SCARBOROUGH, ON. M1H 2Y4 Canada
    Posts
    5
    Plugin Contributions
    0

    Default Re: Facebook Like Button

    I would like to add my own image in place of the standard Facebook image to link to my page there. I'm having difficulties getting it done though. Can anybody help me?

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

    Default Re: Facebook Like Button

    Quote Originally Posted by volkeram View Post
    I would like to add my own image in place of the standard Facebook image to link to my page there. I'm having difficulties getting it done though. Can anybody help me?
    do you mean where your FB link in product page is, you have a small image to use instead of that thumb?


    I have this code added red for the image and purple for how I changed the wording:

    place it in tpl_product_info_display.php also which I put after <!--eof Product Price block -->

    <script>function fbs_click() {u=location.href;t=document.title;window.open('http://www.facebook.com/sharer.php?u='+encodeURIComponent(u)+'&t='+encodeURIComponent(t),'sharer','toolb ar=0,status=0,width=626,height=436');return false;}</script><style> html .fb_share_link { padding:2px 0 0 20px; height:32px;) no-repeat top left; }</style><a href="http://www.facebook.com/share.php?u=<?php echo "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING'];?>" onclick="return fbs_click()" target="_blank" class="fb_share_link"><img src=http://fantasiesrealm.com/images/facebook.gif width=25><font size=+2>&nbsp;&nbsp;Share on FaceBook: &nbsp;<strong><?php echo $products_name; ?></strong></a></font><br/><br/><br/><br/>

    ***all the <br/> are there by me fo spacing on my template you can go to my store to look where I have my FB link at in product pages...so those can be removed.***

    hope this helps

  9. #339
    Join Date
    May 2006
    Location
    Gardiner, Maine
    Posts
    2,371
    Plugin Contributions
    23

    Default Re: Facebook Like Button

    Quote Originally Posted by DarkAngel View Post
    Not sure if this is a bug that attacked my FB button mod but......here is my query this time.

    I swear that at one time no matter where I used the FB button (at store and have a mod for smf in forum too) but I used to submit link (or click like button) and it would go straight to my page on FB. It would show what I was posting and I could edit it to the way I wished A N D I could choose which image to use from an array of them (the little arrows that the box has)....not anymore

    Now when I post a link everything works as it should but I am only left with the primary image, no longer does it show all images available.

    Ideas on what may be the problem?
    I've not seen that but I only use it on the product page. When I didn't have the metatags in there that designated the product image, I didn't see a choice. But I have to say - this would be a facebook thing and have nothing to do with the mod itself.
    The full-time Zen Cart Guru. WizTech4ZC.com
    New template for 2.0 viewable here: 2.0 Demo

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

    Default Re: Facebook Like Button

    Quote Originally Posted by delia View Post
    I've not seen that but I only use it on the product page. When I didn't have the metatags in there that designated the product image, I didn't see a choice. But I have to say - this would be a facebook thing and have nothing to do with the mod itself.
    I thought so too but just asked for ya never know.

    The store mod you created is grand and I loves, loves, loves it. I added my own button cause I can't stand that thumb and reworded the link to show my way...lol

    The promo used in FB is the main product image and does not let us choose from the additional images but tis fine.

    The other one that does pull every single image on the page (not just the post) is in our forum. Not sure how he wrote that mod to pull any image but at times that is helpful to use.

    Thanks and have a Happy Yule.

 

 
Page 34 of 35 FirstFirst ... 2432333435 LastLast

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