Page 5 of 12 FirstFirst ... 34567 ... LastLast
Results 41 to 50 of 115
  1. #41
    Join Date
    May 2009
    Posts
    5
    Plugin Contributions
    0

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

    Facebook Like, Share and Add this pop up menu

    I have edited the file slightly and pasted the code into a different location on the product page (My product image would not display if the code was pasted above the image in ie8)


    Used with Zen Cart 1.3.8a.

    Edited and working in heavily customised site http://www.digitaleasy.co.nz/ecommer...oducts_id=5769

    Not tested in 1.3.9 since It may not work with Facebook Like button links.

    If you're using SEO links you'll have to edit the Facebook Like button below to
    Code:
    <iframe src="http://www.facebook.com/plugins/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']); ?>&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=35" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:35px"></iframe>

    1. Backup includes\templates\template_default\templates\tpl_product_info_display.php and COPY it to includes\templates\YOUR_TEMPLATE\templates\tpl_product_info_display.php edit the file in YOUR_TEMPLATE and no other, keeping the template_default intact as backup.

    2. Here's the code with comments. Read them and edit as needed. You do NOT need to edit other files.

    Code:
    <!--bof Socialize -->
    <style type="text/css">
    	
    
    div.share {float: right; }
    
    
    	div.share ul {float:right; list-style-type:none; padding:0;} 
    	div.share li {float:left; display:inline; padding:0 5px;} 
    </style>
    
    <div class="share">
    	<ul>
    
    		<li>
    			<a name="fb_share" type="button" href="http://www.facebook.com/sharer.php">Share</a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script> <!-- seperate Facebook share button -->
    		</li>
    		<li>
    			<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(zen_href_link(zen_get_info_page((int)$_GET['products_id']),'cPath='.(int)$_GET['cPath'].'&products_id=' . (int)$_GET['products_id'])); ?>&amp;layout=button_count&amp;show_faces=false&amp;width=80&amp;action=like&amp;font=arial&amp;colorscheme=light&amp;height=35" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:80px; height:35px"></iframe> <!-- Facebook button_count Like button using standard Zen Cart product links -->
    		</li>
    		<li>
    			<span class="addthis_toolbox addthis_default_style"> <!-- simple www.addthis.com expandable button. Register to get statistics and edit USERNAME. Remove the img src tag to use addthis standard icon -->
    				<a href="http://www.addthis.com/bookmark.php?v=250&amp;username=USERNAME" class="addthis_button_compact">
    				 More</a>
    			</span>
    			<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#username=USERNAME"></script>
    		</li>
    	</ul>
    </div>
    <!--eof Socialize -->
    3. Edit includes\templates\YOUR_TEMPLATE\templates\tpl_product_info_display.php
    Copy and paste code after <!--eof Main Product Image-->

    Get a Social Media on!

    Hack by Colin S)
    Original code by scrap

  2. #42
    Join Date
    Dec 2008
    Posts
    26
    Plugin Contributions
    0

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

    Hi All,

    I wanted to share some info for you about our experiences trying to integrate FB like.

    We tried the iFrame and XFBML method. Both failed, and will never work because we use the Magic SEO URL module. This is incompatible with FB integration, and will result in only the basic site wide title and URL being passed to a user's FB wall.

    No image, no meta data specific to the product, no description, nothing.

    If anyone is trying it, please be aware of what we have experienced, it will save you a lot of time and headaches.

    The unofficial word from Magic SEO is that they have no time to work around this, and it is safe to assume it will stay this way for the forseeable future.

    In terms of alternatives, there are other URL modules out there, so we can't speak for those, they may work.

    Thanks, Pete

  3. #43
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,113
    Plugin Contributions
    11

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

    <IMHO>

    You can drop any SEO mods as the major search engines don't use them, Google prefers they not be used, and (as witnessed in trying to add FB like) they cause more problems than they are worth.

    </IMHO>

  4. #44
    Join Date
    Dec 2008
    Posts
    26
    Plugin Contributions
    0

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

    Hi All,

    A little clarification is required.

    Magic SEO URLS it turned out was not the issue at all. Jiri from MSU did some debugging for us, and we found it was an issue in our html header.

    FB like, the XFBML method is now working beautifully, and you can see it here as an example.

    I would like to retract my previous comments and say that the MSU system was not in anyway responsible for the issue we had.

    Regarding the SEO URLS, all I can say is that our business increased by 400% the month after we started using them.

    The figures speak for themselves.

  5. #45
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,113
    Plugin Contributions
    11

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

    GREAT! Love it when a site goes from 1 sale to 4

    Seriously, most folks find the SEO URL stuff about 3 months after they start their site. Robots have found the site and the new activity of "changing" the site increases rank for a short time. However, following the tips at http://pro-webs.net/blog/2009/09/10/...-seo-12-steps/ (one of our own) will better serve one over the long run.

    Here's a Google Webmaster article that's almost two years old. A good read.

    We have never used any product to rewrite dynamic URLs and have one customer who is an authorized area distributor for his product. The main company has never made it to the same page. They are generally one or two behind in the search engines.

    We try to follow the good advice of mprough to the letter and getting more into facebook is a large part of it as well.

  6. #46
    Join Date
    Dec 2008
    Posts
    26
    Plugin Contributions
    0

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

    Whatever works for you I guess, good luck with that...

  7. #47
    Join Date
    Feb 2009
    Posts
    88
    Plugin Contributions
    1

    Idea or Suggestion Re: Facebook "Like" button on every product page?

    Just to add, don't forget to update your includes/spiders.txt file to include 'facebookexternalhit', or each page hit will be roughly doubled. See http://www.zen-cart.com/forum/showth...light=facebook

    If you fetch the latest zen cart release, spiders.txt probably contains quite a few worthwhile additions to your own.

    Those of you with really quite old zen cart installs may still have includes/application_top.php that calls counter.php without checking $spider_flag, again, see the latest code.

  8. #48
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,262
    Plugin Contributions
    3

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

    Quote Originally Posted by dbltoe View Post
    GREAT! Love it when a site goes from 1 sale to 4

    Seriously, most folks find the SEO URL stuff about 3 months after they start their site. Robots have found the site and the new activity of "changing" the site increases rank for a short time. However, following the tips at http://pro-webs.net/blog/2009/09/10/...-seo-12-steps/ (one of our own) will better serve one over the long run.

    Here's a Google Webmaster article that's almost two years old. A good read.

    We have never used any product to rewrite dynamic URLs and have one customer who is an authorized area distributor for his product. The main company has never made it to the same page. They are generally one or two behind in the search engines.

    We try to follow the good advice of mprough to the letter and getting more into facebook is a large part of it as well.
    About 18 months ago we inherited a site that was using Magic SEO URL's - and was getting poor rankings on the SE's.

    We completely removed MagicSEO (a real pain in the ######## to do this, but we succeeded).

    Within 4 months (using standard ZC dynaminc links) we were getting far better results.

    Today - after following melanie prough's advice for nearly 6 months now - this site is getting GOOD serps, and business has increased dramatically.

    These SEO URL mods are "snake oil"... avoid them completely.
    19 years a Zencart User

  9. #49
    Join Date
    May 2008
    Posts
    96
    Plugin Contributions
    0

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

    Quote Originally Posted by hey_you View Post
    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;
    Hi,

    For this piece of code to generate the META_TAG_FBIMG, it generates the original uploaded image string.

    IF I am using Image Handler 2, it uses a cached image, any advise how to mod this code to get that cached image link?

    THis is the 3rd day I am trying already, no choice but to ask now

    Thanks :)

  10. #50
    Join Date
    Jul 2008
    Posts
    19
    Plugin Contributions
    0

    help question Re: Facebook "Like" button on every product page?

    Does this code work with 1.3.9e?

    Also, will the "Like" button image create the SSL error in IE about "Even though this site is secure, parts of it are linking to non secure items blah... blah... blah..."?

 

 
Page 5 of 12 FirstFirst ... 34567 ... 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

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR