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!
|
|
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.
|
|
Thank very much Lewys.
This works great !!
|
|
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.
|
|
You will need to register in order to post topics and read replies in the ThemeBurn.com support forums!
|
|
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?
|
|
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
|
|
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
|
|
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?
|
|
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
|
|
OK… This works nicely but how do you make the Facebook comment box responsive?
|
|
@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
|
|
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; ?>
|
|
I can’t use the facebook like box in the footer. the code is making the facebook comments not work properly. Any ideas?
|
|
@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
|
|