Closed (fixed)
Project:
Facebook Like Button
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
13 Apr 2011 at 00:36 UTC
Updated:
5 Jun 2011 at 05:51 UTC
The Facebook like module does not display on node types of Product. Using Ubercart.
www.australianrobotics.com.au/node/292 is a blog post, works fine
www.australianrobotics.com.au/node/167 is a product and does not display
Comments
Comment #1
daze20 commentedsame here...
Comment #2
break commentedSame here.
Permissions are OK on my site
I checked and the "$types_to_like" includes the "product" CCK.
I tried to use the Devel module's dpm($vars), to see whether and what variable of the FBLikeButton module show up, but nothing did.
FYI: I am also using SexyBookmarks and that module has no problem adding code to the Product pages (or blog entries, regular pages...)
Thus I ended up hardcoding the FBLike code into my node-product.tpl.php . Specifically I added the code below onto line 59, right after
This is what I added:
FYI: My site is not yet public, so I cannot show it to you, but at least the FBLikeButton now shows up. Albeit it is a bit too close to the "add to cart" button. I will put the iframe in a 'div' and CSS it later.
Comment #3
Phoriver commentedAwesome, thanks for that code. I just added a "br" before it to space it out nicely!
Thanks again.
Comment #4
Dubber Dan commentedJust installed the module and have exactly the same problem. I'd rather not have to hard-code anything as that kinda defeats the object of having a module do the job.
http://www.elementsforlife.co.uk/shop/superfoods/raw-chocolate/raw-cacao... - product page
http://www.elementsforlife.co.uk/yummy-scrummy-raw-chocolate-brownie - standard page
Any chance of this being looked at and fixed byt the devs?
Comment #5
jerdiggity commentedThat's.... weird (to me). I'll definitely have a look at it to see if I can identify why it would discriminate against "product" node types (and no others).
Comment #6
abx commentedJust tried what "break" suggested. It does work but that means you don't really need this module anymore. It will display even "Facebook Like Button" module doesn't installed.
Comment #7
jerdiggity commentedNot sure what's going on here, to be honest. I just enabled the module in an e-commerce environment (using Ubercart) and had zero issues.
www.yoursite.com/admin/settings/fblikebuttonand enabled product as one of the "likeable" content types?node-product.tpl.php, that could definitely be preventing the box from showing up. Could you (someone) please check if that's possibly the case? Because otherwise, I'm kind of at a loss here...I appreciate the feedback either way, though. And if anyone's able to answer #3 above, that would be great too.
:)
j
Comment #8
abx commentedJust tried 1.1 and got the same result. No Facebook button shows.
I did both question 1 and 2. With question 3, node-product.tpl.php, this should be the problem. I got similar problem on another website that use contemplate. So, I have to put some theme code to make it shows.
However, on both websites, I also use service links module. ( http://drupal.org/project/service_links ) It does show on any content without any problem. (Links will shows on the bottom of content.) No need to modify anything. I don't know what's the different between fblikebutton and service links but it might be useful to take a look at their code.
Thanks for your time.
Comment #9
jerdiggity commented@abx: Just to confirm, did modifying
node-product.tpl.phpfix the issue?Comment #10
abx commentedI did what "break" suggested by add below code into node-product.tpl.php :
But with that, there is no need for fbLikeButton module at all.
I also tried 2 things :
1. Remove node-product.tpl.php that is in Acquia Prosper theme folder.
2. Switch theme from Acquia Prosper to Blue Marine.
FB Like Button shows up if I did either method above. So, that should be theme issue.
Still, as I said earlier, I have zero issue with Service Link module at all. I can use any theme and it will always show up without any modification. I hope that this module will do the same.
Thank you,
Comment #11
jerdiggity commentedOH ok. Thank you for clarifying that.
Incidentally, @break: you should be able to avoid putting all that code into your file by adding this instead:
print $node->content['fblikebutton_button']['#value'];This way, you should still be able to customize the output by going to
admin/settings/fblikebuttonj
Comment #12
jerdiggity commentedNo responses... Assuming this issue has in fact been resolved.
Comment #13
abx commentedAbove code works as it should be. Just place it in theme file. Still, you have to put that in the code manually. The ability to move up or down in FBLikeButton can't be used in this case.
If you don't have any plan to implement something like "Service Link" module. It's better to document it somewhere so user will know what they should do :)
Thank you,