Forums / Templates, Stylesheets, Page Layout / Facebook "Like" button on every product page?

Facebook "Like" button on every product page?

Views: 47,305

Results 101 to 115 of 115
19 Dec 2012, 2:51 PM
#101
jeffharr avatar

jeffharr

New Zenner

Join Date:
Dec 2012
Posts:
2
Plugin Contributions:
0

Facebook "Like" button on every product page?

could someone kindly point me to some sites that have successfully integrated the latest verison of the facebook like feature

thank you

jeff harrison
harrisonbros######################

19 Dec 2012, 2:55 PM
#102
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

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

zencartdelia.com

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

30 Dec 2012, 7:45 PM
#103
stasinos avatar

stasinos

New Zenner

Join Date:
Feb 2012
Posts:
6
Plugin Contributions:
0

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

I have added this code and it appears to be working, but I never see my post on my facebook site when I test as a user. Can you please let me know if anyone else has expearienced this problem where it looks like it works, but you don't see the post in the user's facebook?

Thanks!

30 Dec 2012, 9:33 PM
#104
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

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

I have heard a mumble or two from folks saying they can't see it correctly on Facebook but when I've tested the same links, they were fine. If you want me to test your site, either give me your url here or send it to me by PM

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

30 Dec 2012, 9:42 PM
#105
stasinos avatar

stasinos

New Zenner

Join Date:
Feb 2012
Posts:
6
Plugin Contributions:
0

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

delia:

I have heard a mumble or two from folks saying they can't see it correctly on Facebook but when I've tested the same links, they were fine. If you want me to test your site, either give me your url here or send it to me by PM

Sorry, I meant to post the url. My site is http://glutenfreeproductsdelivered.com

Thanks so much!

Susan

30 Dec 2012, 9:50 PM
#106
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

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

Well, that was interesting - I love the cinnamon bread so it turned out to be a real like but it never posted to my timeline. It used to work that when you hit the like button, the comment box appears underneath - I've never seen a post a comment link before. Is this the default installation with no changes to the button itself?

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

30 Dec 2012, 9:55 PM
#107
stasinos avatar

stasinos

New Zenner

Join Date:
Feb 2012
Posts:
6
Plugin Contributions:
0

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

I did the install from here and then when it didn't work, I went ahead and followed the install instructions from here: http://www.kerrinhardy.com/2010/11/27/add-the-facebook-like-button-to-your-zen-cart-store/

It didn't seem to change anything as it still doesn't work??? Do you have any ideas of what I could check???

Thanks!

Susan

31 Dec 2012, 1:18 PM
#108
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

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

A little hard for me to help you if you aren't using the mod.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

14 Jan 2013, 12:30 PM
#109
tasos7 avatar

tasos7

New Zenner

Join Date:
Jan 2013
Posts:
1
Plugin Contributions:
0

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

I successfully see the Like button on every product page and be able to Like and comment. However, nothing seems to show on facebook.
The code I am using is the below.

<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'])); ?>&layout=standard&show_faces=false&width=310&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:310px; height:30px"></iframe>
```.

I am attaching the entire file for reference.

Is there anyone that can assist me on this?

Regards,
Tasos
14 Jan 2013, 1:00 PM
#110
delia avatar

delia

Totally Zenned

Join Date:
May 2006
Location:
Gardiner, Maine
Posts:
2,383
Plugin Contributions:
7

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

The like button mod does not use the iframe in the source. That was part of the reason for the mod in the first place. So I can't answer your question.

The full-time Zen Cart Guru. WizTech4ZC.com
New template for 2.0 viewable here: 2.0 Demo

17 Jan 2013, 3:16 AM
#111
isaiah36 avatar

isaiah36

Zen Follower

Join Date:
Jun 2006
Posts:
120
Plugin Contributions:
0

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

The website name, and product name were being repeated in the description area of the fb posts, and the fb debug 'Linter' said I should explicitly define 'og:description' so I added the following to Delia's code in meta_tags.php

define('META_TAG_FBDESC', str_replace('"','',zen_clean_html($product_info_metatags->fields['products_description'])));

then I added the following to Delia's meta properties in html_header.php

<meta property="og:description" content="<?php echo META_TAG_FBDESC; ?>"/>

I had already loaded up the javascript with my app ID into a .js file in /includes/templates/[custom_name]/jscript/ directory. (I also have the 'FB.init' related javascript loaded there.) I did not need to make any changes to tpl_product_info_display.php to fine tune how the posts look in the timeline, but I did add fb comments at the bottom of the product info, with the following (the href is redundant of course, but will help in more simple installs)

<div id="fb-root"></div>
<div class="fb-comments" data-href="<?php echo $canonicalLink; ?>" data-width="600" data-num-posts="3" data-colorscheme="dark"></div>

You can see how it all works here http://rastaheadwraps.com/index.php?main_page=product_info&cPath=1&products_id=3
I am not a coder, I am a "monkey see monkey do" type, but I thought I would share with other users.

Thanks for the mod, Delia!

17 Apr 2013, 3:56 AM
#112
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

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

colinS):

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/ecommerce/index.php?main_page=product_info&cPath=398&products_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

<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']); ?>&layout=button_count&show_faces=false&width=80&action=like&font=arial&colorscheme=light&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. > > ``` <!--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'])); ?>&layout=button_count&show_faces=false&width=80&action=like&font=arial&colorscheme=light&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&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

I have used this share mod, and sometimes it does not pull the image as you click on share. It is not consistent.

Is this a facebook issue?

Using Zen Cart 1.5.1

17 Apr 2013, 4:09 AM
#113
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

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

alwaysriding:

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.

Does anyone know how this Facebook like was implemented?

here as an example.

Using Zen Cart 1.5.1

17 Apr 2013, 5:04 AM
#114
gilby avatar

gilby

Totally Zenned

Join Date:
Aug 2005
Location:
Vic, Oz
Posts:
1,816
Plugin Contributions:
0

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

Kevin205:

Does anyone know how this Facebook like was implemented?

here as an example.If you look at the view source in the header. They are using the "Open Graph" to set the facebook parameters.

<!-- bof facebook like button -->
<meta property="og:title" content="Poggio di Sanremo Climb T-Shirt - £18.74" />
<meta property="og:site_name" content="Always Riding" />
<meta property="og:url" content="http://www.alwaysriding.co.uk/poggio-di-sanremo-climb-t-shirt-1341.html" />
<meta property="fb:admins" content="514552228" />
<meta property="fb:app_id" content="118760278148014" />
<meta property="og:image" content="http://www.alwaysriding.co.uk/images/alwaysriding/Poggio+di+Sanremo+Climb+T-Shirt.jpg" />
<meta property="og:type" content="company" />
<!-- eof facebook like button --> 

This is the most reliable way to setup the correct facebook links

17 Apr 2013, 2:58 PM
#115
kevin205 avatar

kevin205

Totally Zenned

Join Date:
Dec 2012
Posts:
607
Plugin Contributions:
0

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

gilby:

If you look at the view source in the header. They are using the "Open Graph" to set the facebook parameters.

<!-- bof facebook like button --> <meta property="og:title" content="Poggio di Sanremo Climb T-Shirt - £18.74" /> <meta property="og:site_name" content="Always Riding" /> <meta property="og:url" content="http://www.alwaysriding.co.uk/poggio-di-sanremo-climb-t-shirt-1341.html" /> <meta property="fb:admins" content="514552228" /> <meta property="fb:app_id" content="118760278148014" /> <meta property="og:image" content="http://www.alwaysriding.co.uk/images/alwaysriding/Poggio+di+Sanremo+Climb+T-Shirt.jpg" /> <meta property="og:type" content="company" /> <!-- eof facebook like button --> ``` > This is the most reliable way to setup the correct facebook links

gilby, thanks for the reply.

I found a link on the net explaining how to add the Open Graph scheme to Zen Cart. As I implemented it. It showed up once, and never did again!

Sometimes when page is refreshed, it shows up again.

Is there a more reliable thread on this forum explaining a how to get this to work?

ps. i can share the link if any one is interested.

Using Zen Cart 1.5.1