Jump to content

[MODULE] Facebook Like - Add a Facebook Like button to the product page or any other location


tomerg3
 Share

Recommended Posts

  • 3 weeks later...
I get this error in red when I press Like button
and as you can see I get duplicated URL. They came up with this error at this thread: Facebook like error but I found no solution for this. Help anyone please.


facebook already solve the problem

Share this post


Link to post
Share on other sites

Hi,

I installed this module (FB Like), but when I click on like and go to my facebook profile, it shows me the like url only.
I don't see the title of my product nor the picture.
How can I see these?
site: www.luna-design.com


thanks,
Meytal

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Awesome module! Great work!

Im encountering one small bug, when I use the send button it nicely adds the picture and info of a product but it shows the box half so the ok button is not visible to send the message.
In other words the bottom half of the send box is not visible.

Is it a known bug?

Share this post


Link to post
Share on other sites

  • 2 weeks later...

I got an href error, what can be the problem?

I am using version 1.3 of PS.

48353_nXw3AGv08GzwskqRGhyA_t

Share this post


Link to post
Share on other sites

hi,

I have some troubles to make the button appear with {$HOOK_FACEBOOK_LIKE}.

I already use {$HOOK_EXTRA_LEFT} for other stuff, and I want the button strictely appear on his own hook.

It is possible? If yes, how? (I guess a change on facebooklike.php file, but not sure...)

many thx

Share this post


Link to post
Share on other sites

I guess so... The only thing I did different is to include following line directly into the original fronController.php file of PS

self::$smarty->assign('HOOK_FACEBOOK_LIKE',Module::hookExec('facebookLike'));

To be clear, the button is currently appearing in 2 hooks included in product.tpl: {$HOOK_EXTRA_LEFT} and {$HOOK_FACEBOOK_LIKE}, and i want it to appear on {$HOOK_FACEBOOK_LIKE} only

Make sense? Iam working on PS 1.4.2.5

Thx for help

Share this post


Link to post
Share on other sites

hi, i have a problem. the module works ok except no thumbnail is showing on facebook share.
i am looking in to this a while. i had v1.2, i just installed v1.3 but no luck. i have the latest prestashop 1.4.3

what is more intresting, is that even if i copy the product page url in my facebook page with copy/paste, the same happens. it retrieves all the page data but i see no thumbnail.

then i found the facebook URL Linter ! great tool.
http://developers.facebook.com/tools/lint

it analyzes the url and shows all the data. there, i see that the images taken from my page are all wrong. i have url rewrite and canonical url open, of course. if i close canonical, nothing changes. i try of course with cache off and even template recompile.

this is a sample page from the live eshop
http://www.zachospharmacy.gr/adinatisma/698--10-.html

any thoughts ?

Share this post


Link to post
Share on other sites

Facebook plugins are compatible with Open Graph, OG is like new "standard" to describe your web site using meta tags.

So you have to put the right meta tags in your product page in order to have the good pictures

Share this post


Link to post
Share on other sites

In IE it throws an error:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; AskTB5.4)
Timestamp: Tue, 12 Jul 2011 03:26:29 UTC


Message: The URI to be decoded is not a valid encoding
Line: 5
Char: 370
Code: 0
URI: http://connect.facebook.net/en_US/all.js#xfbml=1


I added xmlns:fb="http://www.facebook.com/2008/fbml" to the header but still the same. I am wondering how anybody else doesn't have this error, nothing on the forum about it.


EDIT: the problem seems to be gone after clearing browser cache.

Share this post


Link to post
Share on other sites

Hi

Very nice module

I like to have an extra likes on my cms pages. I have added "{$HOOK_FACEBOOK_LIKE}" on cms.tpl but it don't show. What to do ? Where exactly should I add it (I use original cms.tpl from 1.4.2.5)

Regards

Share this post


Link to post
Share on other sites

Have a problem here, when i click on the Like button, and it goes back to the default appearance; it doesn't "stick". Someone told me this is an issue Facebook is having... Any idea when this is going to be solved?

Share this post


Link to post
Share on other sites

ENCRECOM: make sure yo copy the override file, and check that the module is in the new hook, also don't forget to clear the smarty cache.

Blaker: Try to get the latest version, and refresh the smarty cache.

Share this post


Link to post
Share on other sites

:) it's surely the reason. but why does the php of presta gives a 404 image ? that's the problem.
in the same product page, if someone tryies to notify a friend by email, the correct image thumbail shows up. but the facebook module gives a wrong image

Share this post


Link to post
Share on other sites

ENCRECOM: make sure yo copy the override file, and check that the module is in the new hook, also don’t forget to clear the smarty cache.

Override file OK
New hook OK
Cache empty ans still nothing apear.

Here is my cms.tpl

Here is the page of cms:

http://www.massage-boutique.fr/massage-californien-aux-huiles-bio.php

______

{if isset($cms) && $cms->id != $cgv_id}
{include file="$tpl_dir./breadcrumb.tpl"}
{/if}
{if isset($cms) && !isset($category)}
{if !$cms->active}



{l s='This CMS page is not visible to your customers.'}
<input type="hidden" id="admin-action-cms-id" value="{$cms->id}" />
<input type="submit" value="{l s='Publish'}" class="exclusive">
<input type="submit" value="{l s='Back'}" class="exclusive">






{/if}

{$cms->content}

{elseif isset($category)}

{$category->name|escape:'htmlall':'UTF-8'}




{if isset($sub_category) & !empty($sub_category)}

{l s='List of sub categories in '}{$category->name}{l s=':'}



{/if}
{if isset($cms_pages) & !empty($cms_pages)}

{l s='List of pages in '}{$category->name}{l s=':'}



{/if}



{else}
{l s='This page does not exist.'}
{/if}

Share this post


Link to post
Share on other sites

i compare how the image displays correctly on module sendtoafriend
getImageLink($product->link_rewrite, $cover.id_image, 'small')}" alt="" title="{$cover.legend}" />

and this is how the image displays on your module

$fb_cover = ‘http://’.$_SERVER[‘HTTP_HOST’].PS_BASE_URI.‘img/p/’.Tools::getValue(‘id_product’).’-’.$cover[‘id_image’].’.jpg’;

why do you use img/p ?

in my shop images are SEO related and displays like
http://www.zachospharmacy.gr/1132-home/sublime-energy-.jpg

can you give me the correct fb_cover statement with getImageLink ?

ps. the first piece of code does not display ok in the forum

Share this post


Link to post
Share on other sites

  • 3 weeks later...

Hello and thanks for reading this message.

 

I have a question to ask the creator of this module. The module works perfectly, but in Internet Explorer 6 there is a bug in the CSS.

 

The logo of Facebook, overlaps with the button text "Like". Add an image to understand me better:

facebooklikea.jpg

 

In Firebug, I see that some CSS properties, but nevertheless, I not find CSS file where you can make these changes.

 

I know Internet Explorer 6 is deprecated and is not advisable to use, but if you know how to solve this problem would be great.

 

Thank you very much

Share this post


Link to post
Share on other sites

· Error

 

I am also getting an error after pressing like. I am using PS 1.4.4 I have read all the posts in this thread. How do I solve this issue. Is this something to do with Facebook or am i doing something wrong. It is not liking the products. I press like ... then after a second it shows error. Please help. THank you.

 

Solved: Fixed got it by getting an facebook app id THanks.

Edited by Nabeel Aejaz (see edit history)

Share this post


Link to post
Share on other sites

Goto Modules->Positions-> check the "Display non-positionnable hook" box and look for "Extra actions on the product page (left column)"

 

What am i doing wrong?

I'm using the (standard) prestashop theme, but i can't figure out how to postion the facebook like button somewhere else.

Now it is between - print - and - inform a friend - and i don't like it. Or above of down under, but not in between.

I've try some changes in the product.tpl but nothing seemed to help.

Using Prestashop 1.4.4

post-262672-0-62842500-1313343514_thumb.jpg

Share this post


Link to post
Share on other sites

Sorry tomerg3.

 

I published a post few days ago, asking you, if can change the distance between the Facebook button and the text?

 

As I commented in Internet Explorer 6, overlap.

 

is controlled this by Facebook, too?.

 

THANKS ;)

Share this post


Link to post
Share on other sites

  • 2 weeks later...

Hi tomerg3, big thanks for the module!

 

Now, Im using three languages on my site. Swedish/Danish and Norwegian, the button is visible when choosing Swedish and Danish but not Norwegian. I've used the "module translation page", in back end for changing "like" to the proper translation. Any idea why the button disappears when choosing Norwegian?

 

Thanks!

Share this post


Link to post
Share on other sites

Edit facebookline.php and change

$lang = 'no_NO';

To

$lang = 'nn_NO';

 

Thanks, now the button is visable but the text is wrong so trying to translate it from "Lik dette" to "Liker", the formet being the correct one. Tried to translate it under "Tools - module translations" but doesn't seem to do the trick. Some other help?

Share this post


Link to post
Share on other sites

i compare how the image displays correctly on module sendtoafriend<br/><img >getImageLink($product->link_rewrite, $cover.id_image, 'small')}" alt="" title="{$cover.legend}" /><br/><br/>and this is how the image displays on your module<br/><br/>$fb_cover = ‘http://’.$_SERVER[‘HTTP_HOST’].PS_BASE_URI.‘img/p/’.Tools::getValue(‘id_product’).’-’.$cover[‘id_image’].’.jpg’;<br/><br/>why do you use img/p ?<br/><br/>in my shop images are SEO related and displays like<br/>http://www.zachospharmacy.gr/1132-home/sublime-energy-.jpg<br/><br/>can you give me the correct fb_cover statement with getImageLink ?<br/><br/>ps. the first piece of code does not display ok in the forum

 

Hello,

With FacebookLike module. After clicking like.

No image is displayed on facebook for me too.

Did you find the solution?

My link is displayed well. My description too. But no image :( .

 

Thank you in advance

Share this post


Link to post
Share on other sites

jdmorrisn,

 

I am in Estonia as well and it works for me. Make sure that in facebooklike.php, there is a line about at line 245:

 

		elseif ($lang == 'et')
		$lang = 'et_EE';

 

If there isn't, then add it there. I don't remember exactly what I did in there but I am pretty sure it was editing this line.

Share this post


Link to post
Share on other sites

Are you using the latest version of this module?

 

When you view source of a product page, what do you have in the line that starts with

<meta property="og:image" 

 

 

For the module. I have version: v1.3.2 ... That's the good?

And if after <meta property = "og: image".

There are:

 

</script><script src="http://connect.facebook.net/fr_FR/all.js#xfbml=1"></script>

<meta property="og:image" content="http://www.teramer.eu/complements-alimentaires/223-thickbox/guaramac.jpg" />

<link rel="image_src" href="http://www.teramer.eu/complements-alimentaires/223-thickbox/guaramac.jpg" />

 

My website address if necessary : www.teramer.eu

 

Thanks

Share this post


Link to post
Share on other sites

Just a question.

You say: Copy /modules/facebooklike/override/classes/FrontController.php to /override/classes/ (If the file already exists, you will have to merge both files).

 

So FrontController.php exists but in this way _FrontController.php ...

You it must rename your file? Or leave it to the original?

 

I just want to have then on a good display of pictures in facebook

Thank you for your response B)

Share this post


Link to post
Share on other sites

This is ONLY needed if you use the custom hook.

 

_FrontController.php is not the same as FrontController.php, it doesn't matter if they are different by 1 character or by 10.

 

If you try to copy /modules/facebooklike/overrider/classes/FrontController.php to /override/classes/ there will be no conflict or warning that the file already exists...

Share this post


Link to post
Share on other sites

Thank you so much for this module. It works perfectly in V1.4.4

But i have 1 issue only in IE browser 7 or IE 8 as the image attached. My company blocked Facebook. Thus it gives this error when there is no access to facebook.

It works fine when i use IE at places where facebook is permitted.

 

How do i get rid of that error pop up or shown as Yellow icon at the left bottom corner at IE browser?

 

This is my link. Open this using IE 7 or IE 8

post-209862-0-85883200-1315966876_thumb.jpg

Share this post


Link to post
Share on other sites

The error will only occur when you view the site in the company which facebook is blocked by proxy. There is no error prompt when i uninstall this module. It starts to trigger error box when i enable the facebook and run in only stupid IE

Share this post


Link to post
Share on other sites

  • 3 months later...

Hello,

 

is your module suitable to be used on product list page for each and every indivudual product?

 

I know about commercial module "Facebook like in product list", but I would like to know if I can do same with your module.

 

thanks

Share this post


Link to post
Share on other sites

I don't know if the you mean a like button next to each product or one like button for the entire category page.

 

The first is not possible (without major changes), the second would be possible using the custom hook that comes with the module

Share this post


Link to post
Share on other sites

Hello,

 

Thx for your modules !

 

It's possible to help me please ? I need to merge override/Frontcontroller.php for Facebook Like and Google+1 modules and it does work even looking at the original file to see the syntax on FrontController.php

 

Sorry for my stupid question, I try but even with tutorials on the internet, I can not !

 

This

<?php
class FrontController extends FrontControllerCore
{

public function preProcess()
{
 self::$smarty->assign(
 'HOOK_FACEBOOK_LIKE',Module::hookExec('facebookLike'));
 parent::preProcess();
}
}
?>

 

And this

 

<?php
class FrontController extends FrontControllerCore
{

public function preProcess()
{
 self::$smarty->assign('HOOK_GOOGLE_PLUS_ONE',Module::hookExec('googlePlusOne'));
 parent::preProcess();
}
}
?>

 

In one file :(

 

Thx you !

Share this post


Link to post
Share on other sites


<?php
class FrontController extends FrontControllerCore
{

public function preProcess()
{
 self::$smarty->assign('HOOK_GOOGLE_PLUS_ONE',Module::hookExec('googlePlusOne'));
 self::$smarty->assign('HOOK_FACEBOOK_LIKE',Module::hookExec('facebookLike'));
 parent::preProcess();
}
}
?>

Share this post


Link to post
Share on other sites