<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>blog comments as product reviews</title>
    <link>http://forums.shopify.com/categories/1/posts/22711</link>
    <language>en-us</language>
    <description>Feed for discussion topic blog comments as product reviews</description>
    <item>
      <title>blog comments as product reviews</title>
      <author>shopster</author>
      <pubDate>Thu, 09 Oct 2008 17:40:10 +0000</pubDate>
      <link>http://forums.shopify.com/categories/1/posts/22711</link>
      <guid>http://forums.shopify.com/categories/1/posts/22711</guid>
      <description>&lt;p&gt;I have used blog posts as product specific info before, but I was thinking this morning that maybe we could use the new comments feature to allow commenting on the product page&amp;#8230; seems like it would be possible to have a blog entry for each product (matching on the name) and include a form in the product.liquid that would allow for posting new comments to the blog entry. Haven&amp;#8217;t tried it yet but seems like it would work&amp;#8230;&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt; works like a charm! Something I&#8217;d suggest doing to improve this would be to use Ajax to create the comment post so you stay on the product page and don&#8217;t go to the comments page (although that&#8217;s not too bad). &lt;br /&gt;&lt;code&gt;&lt;pre&gt;
{% for article in blogs.product-comments.articles %}
{% if {{article.title}} == {{product.title}}%}
&amp;lt;div id="comments"&amp;gt;
{% if article.comments_count &amp;gt; 0 %}
 &amp;lt;h3&amp;gt;{{ article.comments_count }} {{ article.comments_count | pluralize: 'Review', 'Reviews' }}
     for &amp;lt;em&amp;gt;{{ article.title }}&amp;lt;/em&amp;gt;&amp;lt;/h3&amp;gt;
    &amp;lt;ul id="comment-list"&amp;gt;
    {% for comment in article.comments %}
      {% if comment.status == 'published' %}
      &amp;lt;li&amp;gt;
        &amp;lt;div class="comment"&amp;gt;
          {{ comment.content }}
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="comment-details"&amp;gt;
          Posted by &amp;lt;span class="comment-author"&amp;gt;{{ comment.author }}&amp;lt;/span&amp;gt;
          on &amp;lt;span class="comment-date"&amp;gt;{{ comment.created_at | date: "%B %d, %Y" }}&amp;lt;/span&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;/li&amp;gt;
    {% endif %}
    {% endfor %}
    &amp;lt;/ul&amp;gt;
  {% endif %}
  &amp;lt;/div&amp;gt;
  &amp;lt;form id="article-{{ article.id }}-comment-form" 
        class="comment-form" method="post" 
        action="/blogs/product-comments/{{ article.id }}-{{ article.title | handleize }}/comments"&amp;gt;
    &amp;lt;h3&amp;gt;What do you think of {{product.title}}?&amp;lt;/h3&amp;gt;
    {{article.content}}
    &amp;lt;dl&amp;gt;
      &amp;lt;dt&amp;gt;&amp;lt;label for="comment_author"&amp;gt;Your name&amp;lt;/label&amp;gt;&amp;lt;/dt&amp;gt;
      &amp;lt;dd&amp;gt;&amp;lt;input type="text" id="comment_author" name="comment[author]" size="40" value="" /&amp;gt;&amp;lt;/dd&amp;gt;
      &amp;lt;dt&amp;gt;&amp;lt;label for="comment_email"&amp;gt;Your email&amp;lt;/label&amp;gt;&amp;lt;/dt&amp;gt;
      &amp;lt;dd&amp;gt;&amp;lt;input type="text" id="comment_email" name="comment[email]" size="40" value="" /&amp;gt;&amp;lt;/dd&amp;gt;
      &amp;lt;dt&amp;gt;&amp;lt;label for="comment_body"&amp;gt;Your comment&amp;lt;/label&amp;gt;&amp;lt;/dt&amp;gt;
      &amp;lt;dd&amp;gt;&amp;lt;textarea id="comment_body" name="comment[body]" cols="40" rows="5"&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/dd&amp;gt;
    &amp;lt;/dl&amp;gt;  
    &amp;lt;input type="submit" value="Post a review" id="comment-submit" /&amp;gt;
&amp;lt;/form&amp;gt;
{% endif %}
{% endfor %}
&lt;/pre&gt;&lt;/code&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Caroline Schnapp commented</title>
      <author>Caroline Schnapp</author>
      <pubDate>Thu, 09 Oct 2008 18:03:22 +0000</pubDate>
      <link>http://forums.shopify.com/categories/1/posts/22711#comment-22713</link>
      <guid>http://forums.shopify.com/categories/1/posts/22711#comment-22713</guid>
      <description>&lt;blockquote&gt;
		&lt;p&gt;include a form in the product.liquid that would allow for posting new comments to the blog entry.&lt;/p&gt;
	&lt;/blockquote&gt;


	&lt;p&gt;It&amp;#8217;s worth trying out, copying and pasting the form in the product template to see if that&amp;#8217;d work.&lt;/p&gt;</description>
    </item>
    <item>
      <title>shopster commented</title>
      <author>shopster</author>
      <pubDate>Thu, 09 Oct 2008 18:31:56 +0000</pubDate>
      <link>http://forums.shopify.com/categories/1/posts/22711#comment-22715</link>
      <guid>http://forums.shopify.com/categories/1/posts/22711#comment-22715</guid>
      <description>&lt;p&gt;yeah I looked at it and it just posts the form to&lt;/p&gt;


	&lt;p&gt;/blogs/[BLOGNAME]/[ID]-[POSTNAME]/comments&lt;/p&gt;</description>
    </item>
    <item>
      <title>Caroline Schnapp commented</title>
      <author>Caroline Schnapp</author>
      <pubDate>Thu, 09 Oct 2008 19:13:07 +0000</pubDate>
      <link>http://forums.shopify.com/categories/1/posts/22711#comment-22717</link>
      <guid>http://forums.shopify.com/categories/1/posts/22711#comment-22717</guid>
      <description>&lt;p&gt;If what you put as action attribute is correct, this will work, then. I mean, you need to put the correct [BLOGNAME], [ID] and [POSTNAME].&lt;/p&gt;</description>
    </item>
    <item>
      <title>shopster commented</title>
      <author>shopster</author>
      <pubDate>Thu, 09 Oct 2008 19:19:13 +0000</pubDate>
      <link>http://forums.shopify.com/categories/1/posts/22711#comment-22718</link>
      <guid>http://forums.shopify.com/categories/1/posts/22711#comment-22718</guid>
      <description>&lt;p&gt;Pretty cool, this does work! Something I&amp;#8217;d suggest doing to improve this would be to use Ajax to create the comment post so you stay on the product page and don&amp;#8217;t land on the blog comments page (although that&amp;#8217;s not too bad).&lt;/p&gt;</description>
    </item>
    <item>
      <title>tobi commented</title>
      <author>tobi</author>
      <pubDate>Thu, 09 Oct 2008 21:55:20 +0000</pubDate>
      <link>http://forums.shopify.com/categories/1/posts/22711#comment-22724</link>
      <guid>http://forums.shopify.com/categories/1/posts/22711#comment-22724</guid>
      <description>&lt;p&gt;haha, nice hack ;-)&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
