Facebook comments

This topic has been marked as resolved.

I want to add unique comments for each product on my website. I found this topic:

http://support.themeburn.com/topic/facebook-comments-code

but when I’m adding

<div class="fb-comments" data-href="<?php echo $CURRENT_URL; ?>" data-num-posts="2" data-width="500"></div>

the comments box appears on product page, but it shows error:

Warning: http://invalid.invalid/b>:%20Undefined%20variable:%20CURRENT_URL%20in%20<b>/usr/www/users/krokoo/suay/catalog/view/theme/shoppica2/template/product/product.tpl</b>%20on%20line%20<b>371</b> is unreachable.

How can I fix it?

Thanks in advance!

 lewys
August 11, 2012 at 7:39 pm #12355

Ok, I sorted it out.

I downloaded free vqmod and modified it for shoppica 2.

If someone need it I’m attaching it to the post.

 lewys
August 11, 2012 at 8:59 pm #12356

Thank very much Lewys.

This works great !!

 Ousama
August 11, 2012 at 10:57 pm #12359

You’re welcome!

Maybe someone know how to receive notification if new comment added? i know it’s possible, but I don’t know how to modify the code.

 lewys
August 12, 2012 at 9:04 am #12360
You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!
August 14, 2012 at 2:10 pm #12436

But if I’ll add only this line of code to product.tpl it will not allow me to moderate comments in http://developers.facebook.com/tools/comments ? With vqmod I can do it, because it contains code that associate the comment box with my app. Am I right?

 lewys
August 14, 2012 at 2:18 pm #12437

Hi,

You can already insert an APP ID from Shoppica 2 CP > Footer > Facebook tab. Also the Facebook Javascript SDK is initialized, once you have an active like box.

So you can reduce the vqmod to only adding the <div class="fb-comments"></div> line.

Best,
ThemeBurn team

August 14, 2012 at 2:34 pm #12439

Great! I forgot that I can add APP ID in Shoppica settings :)

Now I have only issue with Multilanguage SEO urls, when I’m changing language comment box says Warning: http://site.com/blahblah/myseourl is unreachable

But it’s not a Shoppica issue :)

Thank you very much for help!

Sincerely,
Alex

 lewys
August 14, 2012 at 2:46 pm #12441

Unfortunately I noticed that the added comments doesn’t appear in http://developers.facebook.com/tools/comments

When I’m checking product pages in
http://developers.facebook.com/tools/debug

it says:

Inferred Property: The ‘og:url’ property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property: The ‘og:title’ property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property: The ‘og:description’ property should be explicitly provided, even if a value can be inferred from other tags.

Maybe this is the problem?

 lewys
August 14, 2012 at 5:54 pm #12459

Hi,

These are not critical errors and shoundn’t be the cause for a problem with comment moderation.

Unfortunately, we can’t help you more here, as we are not very familiar with the Facebook API.

Best,
ThemeBurn team

August 18, 2012 at 4:30 pm #12647

OK… This works nicely but how do you make the Facebook comment box responsive?

January 18, 2014 at 3:50 pm #30030

@TinyFoot

You can find more information about responsive facebook comments here:

http://stackoverflow.com/questions/6500424/is-it-possible-to-set-a-fluid-width-for-facebooks-social-plugins

BR,
ThemeBurn team

January 28, 2014 at 9:58 am #30147

I noticed some changes must have took place with the facebook comments lately. The APP ID insert from the admin doesn’t work anymore. I had to insert the needed code in the head instead so i can moderate comments.

Also, i get two links for facebook comments. And by this i mean there is a different set of comments on:
siteadress.com/product
siteadress.com/category/product

Is there another variable for the page link that will get this to display the same comments for one product?

Right now i’m using
<?php echo $tbData->current_url; ?>

March 17, 2014 at 12:00 pm #31069

I can’t use the facebook like box in the footer. the code is making the facebook comments not work properly. Any ideas?

March 19, 2014 at 3:27 pm #31098

@TinyFoot

1) Unfortunately, the OpenCart url structure has its flaws and the duplicate content is one of them. You will have to make some redirect in order to point all duplicate pages to site.com/product e.g. There may be some third party SEO extension that does that job, but we can’t recommend any.

2) The Facebook API initialization can be found in catalog/view/theme/shoppica2/template/tb/header_facebook.tpl. Although it should work, you can try to update the initialization code with the latest one provided by Facebook.

BR,
ThemeBurn team

March 20, 2014 at 5:52 pm #31132
Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.