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

Facebook "Like" button on every product page?

Views: 47,305

Results 61 to 80 of 115
8 Sep 2010, 12:30 PM
#61
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Facebook "Like" button on every product page?

I added the code and got the Like button to appear but for some reason it's using the last image on the product_info page which is usually from the "customers also purchased" section. This only happens when you post a comment when adding a Like. Anyone else get this behavior? Any ideas?


Zen Cart and it's community are the best!!

11 Sep 2010, 12:08 AM
#62
zoar avatar

zoar

New Zenner

Join Date:
Sep 2010
Posts:
1
Plugin Contributions:
0

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

Hey everyone,

great addition, hopefully a quick question for everyone:

When I click the like button my facebook feed reads: "Rowan likes test product [1.1] - $0.90 : Zen Cart!, The Art of E-commerce."

I've edited the meta_tags php file, but I can't seem to shake this tag.

Store link

I'm currently running v1.3.9f, pureblue template, canada post module, and lightbox module

Any advice would be greatly appreciated.

11 Sep 2010, 3:24 AM
#63
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

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

zoAr:

Hey everyone,

great addition, hopefully a quick question for everyone:

When I click the like button my facebook feed reads: "Rowan likes test product [1.1] - $0.90 : Zen Cart!, The Art of E-commerce."

I've edited the meta_tags php file, but I can't seem to shake this tag.

Store link

I'm currently running v1.3.9f, pureblue template, canada post module, and lightbox module

Any advice would be greatly appreciated.

Working for me, just liked it and saw your pony meta tag and not the stock zc tag. Interestingly, I did not get the image showing even if I added a comment(see my above post). So it's all good for your site, you have to remember to clear the browser cache and page cookies sometimes to see changes.


Zen Cart and it's community are the best!!

11 Sep 2010, 7:48 PM
#64
kezan98 avatar

kezan98

Zen Follower

Join Date:
Nov 2007
Location:
UK
Posts:
98
Plugin Contributions:
0

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

I'm really impressed with this as it's worked well when you click the share (to facebook) button, but if I click the like button it doesn't show up on my list of likes in facebook. Is there a slight delay on it?

13 Sep 2010, 12:22 PM
#65
stuff4toys avatar

stuff4toys

Totally Zenned

Join Date:
May 2007
Location:
SW Florida
Posts:
1,062
Plugin Contributions:
1

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

BlessIsaacola:

Can you please kindly post the instruction/code for implementing the XFBML version of the Like button? Thanks!
Me Too Me Too
Also the "Share" button you use.

Newest Site: ChargerPros - Stuff4Toys

15 Sep 2010, 1:31 AM
#66
kevinmc3 avatar

kevinmc3

Totally Zenned

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

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

ver 1.3.9c

Well my Facebook LIKE button has worked fine for the past several months. But, within the last week or 2 , when I hit it, I login to FB, but it does NOT post to my FB Wall.

See here on any product page, please try and see if you have success.
http://www.cvtreasures.com

22 Sep 2010, 11:33 PM
#67
ballyc27 avatar

ballyc27

New Zenner

Join Date:
Sep 2007
Posts:
65
Plugin Contributions:
0

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

Hey there,

referring to post #29, hey_you talks about a method of controlling the image that is displayed on the facebook page after a 'like' button is clicked. I've tried this method but cannot get it to work. Has anyone else got it to work or found another way of doing it?

Thanks.
store.theebooksale.com

23 Sep 2010, 12:03 AM
#68
khopek avatar

khopek

Totally Zenned

Join Date:
Aug 2006
Location:
portlandish, oregon
Posts:
795
Plugin Contributions:
0

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

ballyc27:

Hey there,

referring to post #29, hey_you talks about a method of controlling the image that is displayed on the facebook page after a 'like' button is clicked. I've tried this method but cannot get it to work. Has anyone else got it to work or found another way of doing it?

Thanks.
store.theebooksale.com

On my site I just created a file called jscript_fbimage.php with the following code inside

<?php
  /**
   * Add "image_src" link to <head> section for current product's image
   */
  $sql = "select p.products_id, p.products_image
           from   " . TABLE_PRODUCTS . " p
           where  p.products_status = '1'
           and    p.products_id = '" . (int)$_GET['products_id'] . "'";
  $product_info = $db->Execute($sql);

  $products_image = $product_info->fields['products_image'];
  if ($products_image == '' and PRODUCTS_IMAGE_NO_IMAGE_STATUS == '1') {
    $products_image = PRODUCTS_IMAGE_NO_IMAGE;
  }
  if ($products_image != '') {
    require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE));
?>
<link rel="image_src" href="<?php echo HTTP_SERVER . DIR_WS_CATALOG . $products_image_medium; ?>" />
<?php  }

and threw it in the includes/modules/pages/product_info folder.

I'm not using the FB Like button because I cannot get it to work so I gave up, but it still works if someone shares to FB through AddThis , etc...

23 Sep 2010, 8:46 AM
#69
ballyc27 avatar

ballyc27

New Zenner

Join Date:
Sep 2007
Posts:
65
Plugin Contributions:
0

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

Hi khopek,

thanks for the post.
I have the FB 'like' button almost working so I'd prefer to stick with that.
What's not working:

  1. The product name is repeated (and also there is a price and general store info that I would like to remove)
  2. The image posted in facebook is the VISA image:

Is there a solution to these?
I would prefer to remove the image altogether if it can't be fixed. Any ideas?

Thanks.

23 Sep 2010, 1:00 PM
#70
khopek avatar

khopek

Totally Zenned

Join Date:
Aug 2006
Location:
portlandish, oregon
Posts:
795
Plugin Contributions:
0

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

I'm fairly certain the solution I posted for you will work just fine for pulling the correct image. It came from another zenner when I needed help getting the correct image to show when things were shared to facebook. All the code is doing selecting the product id and corresponding image.

23 Sep 2010, 2:59 PM
#71
ballyc27 avatar

ballyc27

New Zenner

Join Date:
Sep 2007
Posts:
65
Plugin Contributions:
0

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

Hi again khopek,

so, I tried as follows:

  1. Inserted code into tpl_product_info_display.php as described in post #5 (works ok)
  2. Created a file called jscript_fbimage.php as you suggest and added it to the product_info folder

Should that be everything? The visa image still gets posted. I must be missing something...any ideas?

23 Sep 2010, 3:08 PM
#72
khopek avatar

khopek

Totally Zenned

Join Date:
Aug 2006
Location:
portlandish, oregon
Posts:
795
Plugin Contributions:
0

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

If that method doesn't work then remove it and lets try this:

Numinix has a good post on his blog of how to get the FB Like button working correctly.

http://www.numinix.com/blog/2010/06/14/how-to-add-a-facebook-like-button-to-your-zen-cart-product-pages/

Sorry I can't be of more help.

23 Sep 2010, 4:12 PM
#73
ballyc27 avatar

ballyc27

New Zenner

Join Date:
Sep 2007
Posts:
65
Plugin Contributions:
0

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

Ya beauty...she's 100% now!
Thanks!
:clap:

23 Sep 2010, 7:24 PM
#74
becks3636 avatar

becks3636

New Zenner

Join Date:
Feb 2010
Posts:
13
Plugin Contributions:
0

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

Hi,

Does anyone know how I can put a facebook 'like' button in my shop. Ive tried Google-ing it, but none of these solutions seem to work, and also entering the code myself doesn't work.

Thanks. :wacko:

27 Sep 2010, 12:48 PM
#75
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've got a contribution ready for the facebook like button. The thread for it is here: http://www.zen-cart.com/forum/showthread.php?p=939605

I have not yet uploaded the contribution as I would prefer it best tested first. Please contact me to get the zipped file.

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

16 Nov 2010, 2:05 AM
#76
100asa avatar

100asa

Totally Zenned

Join Date:
Oct 2006
Location:
Italy
Posts:
636
Plugin Contributions:
0

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

but on facebook there's the link at product, but not image

17 Nov 2010, 12:54 PM
#77
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 images only show if someone posts a comment. Just clicking the like button does not trigger that.

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

17 Nov 2010, 1:49 PM
#78
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

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

delia:

The images only show if someone posts a comment. Just clicking the like button does not trigger that.

Using AddThis code shows the image whether the visitor Like with or without comment. That's the code we are using on our site now.

Thanks!

17 Nov 2010, 2:12 PM
#79
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?

What add this code? Have you posted it here before?

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

17 Nov 2010, 5:14 PM
#80
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

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

delia:

What add this code? Have you posted it here before?

There are a few options for Facebook Like button here: http://www.addthis.com/gallery and this is the modified code I am using on our site:

<a class="addthis_button_facebook_like" fb:like:layout="standard" fb:like:width="450" fb:like:height="61"></a>

The forum on AddThis contains more detail information on how to implement the like button using their code (and it also solves the script error that requires modification to tpl_main_page.php).