If you have the Facebook "Like" button enabled for your products, you may also wish to have the comment system enabled as well. Please note that as this code was working at the time of writing, future updates may require you to customize the code.
1.) Login to your store's control panel.
2.) Click on Design.

3.) Click the Browse Tempalte Files button.

4.) Now, find HTMLHead.html in the top left box and click on it.

5.) Scroll down to just before the tag and paste the code below.
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}
(document, 'script', 'facebook-jssdk'));</script>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}
(document, 'script', 'facebook-jssdk'));</script>

6.) Click Save.

7.) Now, scroll down to product.html in the bottom left box.

8.) Paste the following code exactly where you want the comments to appear (We recommend to paste the code in the middle column, LayoutColumn2, just before .)
<div data-href="%%GLOBAL_CurrentProductLink%%" data-num-posts="10" data-width="470"></div>
For those of you who have a dark theme based store, you can use the following code in order to display the comments.
<div data-href="%%GLOBAL_CurrentProductLink%%" data-num-posts="10" data-width="470" data-colorscheme="dark"></div>

9.) Click Save.

Now, you should have Facebook's comment system on your product pages.

0 comments:
Post a Comment