Implementation of the Facebook Like button on each product page

Hi,



Does anyone know how to implement the Facebook Like button on each product page?

To be more specific, Facebook has this new Like button, which you can build yourself and get the code.

however, you can only provide a static url, whereas I would like to post this button on each product page in a dynamic way.



Any suggestions?

Anyone???!!!

This is a great idea! I haven’t looked into how to add it yet but will be doing that later. If I find a solution, I’ll let you know. I’m on 2.0.8 so it might need slight tweaking since you’re on a higher version.

Hi there,



This might be what your looking for:

[url]http://www.addthis.com/[/url]



easy to implement :slight_smile:

There is actually a new “like this” button that you can place on your site. I had a good look at it the other day and it’s a very cool thing to use. I don’t think it’s meant to be used on a product level though, but I could be wrong about that. I thought it was just placed on your sites homepage.

Yes I got facebooks “likethis” code I just put the code in a block on my homepage and away it goes, also shows the lastmessageposted on facebook account.

I like it



John

The Addthis button is different than the like button.

Has anyone managed to understand how to do it in a dynamic way?



scase - how was your experience with it?

I haven’t tried it yet. I think it would be a nice addition, though, so hope to find the time to figure it out soon.

It could be put in the product description box as a workround for now.



John

[quote name=‘johnbol1’]It could be put in the product description box as a workround for now.



John[/QUOTE]



Thanks John. However the location is less a problem - this is a piece of code provided by Facebook and they ask for the url you want the “like” to be for. What I would like to have is something like mywebsite.com - This website is for sale! - mywebsite Resources and Information. or something like that - so that the url will change for each product.

VERSION 1.35 sp4



I added






Replace yourcart.com with your domain

I placed this code in product_details.tpl

directly under

{if $product.image_pairs}

{include file="products_pages/additional_images.tpl" product=$product show_detailed_link="Y"}

{/if}


THIS IS ONLY FOR 1.35SP4

meta.tpl needs the following added




{$page_title}

{else}

{$lang.page_title_text}

{foreach from=$breadcrumbs item=i name=“bkt”}

{if $smarty.foreach.bkt.index==1} - {/if}{if !$smarty.foreach.bkt.first}{$i.title|escape}{if !$smarty.foreach.bkt.last} :: {/if}{/if}

{/foreach}

{/if}

{/strip}’/>







Fill in Your Website Name



And link to your logo with the full url

thanks works great!

og:image - The URL of the best picture for this page. The image must be at least 50px by 50px and have a maximum aspect ratio of 3:1.

Any quicly issue to have unique picture for each page ? ( product thumbnails per ex)

{assign var=“detailed_href” value=“$images.detailed.image_path”} to generate automaticly the corect path



How to add facebook like the correct way




  1. BACK UP YOUR TEMPLATE

    Make sure you have SEO addon turned on


  2. edit your index.tpl file

    Change your tag to include facebook details



3) edit meta.tpl

Add the following












edit blocks/product_tabs/description.tpl * NOTE yourdomain.com

ADD

```php






```



And that should be it

The liked pages can be viewed by facebook admin as editing a facebook page

I've learned so much from these forums, time I gave something back!!!

Bump for useful info. :slight_smile:



What are the character strings after XMLNS. I just see a converted “surprised” face.



Can I see your website DJstevie? Just like to see how you implemented it. Thanks!

I’m excited, this is going to be great !

Works great, but what if I want it, under saving and before the options…





I tried adding the code to products.tpl but had no luck,

I tried the method above but I think the iFrame is in conflict with some other addons I have in the page. Where do I place the code to use JavaScript instead of iFrame?



From Facebook:


[QUOTE]

We highly recommend using JavaScript to add a Like Box, as it allows your site to add more social plugins (other Like Boxes or Live Stream Boxes) easily in the future.



If you are unable to use this method for some reason, you can use add a Like Box using an HTML iframe tag, which you can get from the Like Box wizard. The code looks like this:



[url]http://wiki.developers.facebook.com/index.php/Like_Box[/url][/QUOTE]

delete

[quote name='djstevie84']www.[/QUOTE]



I like the ADD THIS add on… Looks great, how did you do it ?h