<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>Comments on: Display Product rating in the products list in Prestashop</title>
	<atom:link href="http://nemops.com/prestashop-product-rating-product-list/feed/" rel="self" type="application/rss+xml" />
	<link>http://nemops.com/prestashop-product-rating-product-list/</link>
	<description>Prestashop Tutorials, Modules and More!</description>
	<lastBuildDate>Fri, 10 Mar 2023 23:25:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.1.35</generator>
	<item>
		<title>By: Kirtan</title>
		<link>http://nemops.com/prestashop-product-rating-product-list/comment-page-2/#comment-46167</link>
		<dc:creator><![CDATA[Kirtan]]></dc:creator>
		<pubDate>Fri, 16 Oct 2015 09:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=1214#comment-46167</guid>
		<description><![CDATA[is this work&#039;s in prestashop v1.6.1.1 ?]]></description>
		<content:encoded><![CDATA[<p>is this work&#8217;s in prestashop v1.6.1.1 ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lordbdp</title>
		<link>http://nemops.com/prestashop-product-rating-product-list/comment-page-2/#comment-45910</link>
		<dc:creator><![CDATA[lordbdp]]></dc:creator>
		<pubDate>Tue, 10 Feb 2015 20:42:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=1214#comment-45910</guid>
		<description><![CDATA[I will test it but I have a question :
How see the rates only when the product is rated ?]]></description>
		<content:encoded><![CDATA[<p>I will test it but I have a question :<br />
How see the rates only when the product is rated ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Soufiane</title>
		<link>http://nemops.com/prestashop-product-rating-product-list/comment-page-2/#comment-45871</link>
		<dc:creator><![CDATA[Soufiane]]></dc:creator>
		<pubDate>Mon, 19 Jan 2015 16:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=1214#comment-45871</guid>
		<description><![CDATA[Hi!
Please how can i do that in prestashop 1.6.11?]]></description>
		<content:encoded><![CDATA[<p>Hi!<br />
Please how can i do that in prestashop 1.6.11?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kon Rad</title>
		<link>http://nemops.com/prestashop-product-rating-product-list/comment-page-1/#comment-45599</link>
		<dc:creator><![CDATA[Kon Rad]]></dc:creator>
		<pubDate>Thu, 27 Feb 2014 13:03:00 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=1214#comment-45599</guid>
		<description><![CDATA[Not working 1.5.6.2...
In new hook i see something like duplicate of the product

function hookProductInList($params)
    {
    require_once(dirname(__FILE__).&#039;/ProductComment.php&#039;);
    require_once(dirname(__FILE__).&#039;/ProductCommentCriterion.php&#039;);

    $id_product = $params[&#039;idproduct&#039;];
    $product_average = 0;

    $grades = ProductComment::getAveragesByProduct($id_product, $this-&gt;context-&gt;language-&gt;id);
    $criterions = ProductCommentCriterion::getByProduct($id_product, $this-&gt;context-&gt;language-&gt;id);
    $grade_total = 0;

    if (count($grades) &gt; 0)
    {
    foreach ($criterions as $criterion)
    {
    if (isset($grades[$criterion[&#039;id_product_comment_criterion&#039;]]))
    {
    $grade_total += (float)($grades[$criterion[&#039;id_product_comment_criterion&#039;]]);
    }
    }

    $product_average = $grade_total / count($criterions);
    }
    $this-&gt;context-&gt;smarty-&gt;assign(&#039;average_total&#039;, (int)$product_average);
    return $this-&gt;display(__FILE__, &#039;/product-list.tpl&#039;);

    }




{section name=&quot;i&quot; start=0 loop=5 step=1}
    {if $smarty.section.i.index lt $average_total}
                    &lt;a href=&quot;&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;
    {else}
        &lt;a href=&quot;&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;        
    {/if}
{/section}




o.O
Help?]]></description>
		<content:encoded><![CDATA[<p>Not working 1.5.6.2&#8230;<br />
In new hook i see something like duplicate of the product</p>
<p>function hookProductInList($params)<br />
    {<br />
    require_once(dirname(__FILE__).&#8217;/ProductComment.php&#8217;);<br />
    require_once(dirname(__FILE__).&#8217;/ProductCommentCriterion.php&#8217;);</p>
<p>    $id_product = $params[&#8216;idproduct&#8217;];<br />
    $product_average = 0;</p>
<p>    $grades = ProductComment::getAveragesByProduct($id_product, $this-&gt;context-&gt;language-&gt;id);<br />
    $criterions = ProductCommentCriterion::getByProduct($id_product, $this-&gt;context-&gt;language-&gt;id);<br />
    $grade_total = 0;</p>
<p>    if (count($grades) &gt; 0)<br />
    {<br />
    foreach ($criterions as $criterion)<br />
    {<br />
    if (isset($grades[$criterion[&#8216;id_product_comment_criterion&#8217;]]))<br />
    {<br />
    $grade_total += (float)($grades[$criterion[&#8216;id_product_comment_criterion&#8217;]]);<br />
    }<br />
    }</p>
<p>    $product_average = $grade_total / count($criterions);<br />
    }<br />
    $this-&gt;context-&gt;smarty-&gt;assign(&#8216;average_total&#8217;, (int)$product_average);<br />
    return $this-&gt;display(__FILE__, &#8216;/product-list.tpl&#8217;);</p>
<p>    }</p>
<p>{section name=&#8221;i&#8221; start=0 loop=5 step=1}<br />
    {if $smarty.section.i.index lt $average_total}<br />
                    <a href="" rel="nofollow"></a><br />
    {else}<br />
        <a href="" rel="nofollow"></a><br />
    {/if}<br />
{/section}</p>
<p>o.O<br />
Help?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: illiachenvar</title>
		<link>http://nemops.com/prestashop-product-rating-product-list/comment-page-1/#comment-45539</link>
		<dc:creator><![CDATA[illiachenvar]]></dc:creator>
		<pubDate>Fri, 10 Jan 2014 12:22:16 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=1214#comment-45539</guid>
		<description><![CDATA[great tutorial - THANK YOU!

and works with PS 1.5.6.1 :)]]></description>
		<content:encoded><![CDATA[<p>great tutorial &#8211; THANK YOU!</p>
<p>and works with PS 1.5.6.1 <img src="http://nemops.com/wp-includes/images/smilies/icon_smile.gif" alt=":)" class="wp-smiley" /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jonbzode</title>
		<link>http://nemops.com/prestashop-product-rating-product-list/comment-page-1/#comment-43763</link>
		<dc:creator><![CDATA[jonbzode]]></dc:creator>
		<pubDate>Wed, 13 Nov 2013 09:21:30 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=1214#comment-43763</guid>
		<description><![CDATA[Hello Nemo,
Awesome code, just getting into prestashop coming from pure php/web stuff, and very nice it is too.
I&#039;ve added a little code to this that I thought I&#039;d share (very minor addition!)

changing your product-list.tpl from:


{section name=&quot;i&quot; start=0 loop=5 step=1}
    {if $smarty.section.i.index lt $average_total}
                    &lt;a href=&quot;&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;
    {else}
        &lt;a href=&quot;&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;         
    {/if}
{/section}


To:

{if $smarty.section.i.index lt $average_total == &#039;0&#039;}

{else}

{section name=&quot;i&quot; start=0 loop=5 step=1}
    {if $smarty.section.i.index lt $average_total}
                    &lt;a href=&quot;&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;
    {else}
        &lt;a href=&quot;&quot; rel=&quot;nofollow&quot;&gt;&lt;/a&gt;         
    {/if}
{/section}

{/if}

Just a small addition to make no stars show up if the average is 0 or there has been no comments left yet.
Keep Up The Good Work!
Jonbzode]]></description>
		<content:encoded><![CDATA[<p>Hello Nemo,<br />
Awesome code, just getting into prestashop coming from pure php/web stuff, and very nice it is too.<br />
I&#8217;ve added a little code to this that I thought I&#8217;d share (very minor addition!)</p>
<p>changing your product-list.tpl from:</p>
<p>{section name=&#8221;i&#8221; start=0 loop=5 step=1}<br />
    {if $smarty.section.i.index lt $average_total}<br />
                    <a href="" rel="nofollow"></a><br />
    {else}<br />
        <a href="" rel="nofollow"></a><br />
    {/if}<br />
{/section}</p>
<p>To:</p>
<p>{if $smarty.section.i.index lt $average_total == &#8216;0&#8217;}</p>
<p>{else}</p>
<p>{section name=&#8221;i&#8221; start=0 loop=5 step=1}<br />
    {if $smarty.section.i.index lt $average_total}<br />
                    <a href="" rel="nofollow"></a><br />
    {else}<br />
        <a href="" rel="nofollow"></a><br />
    {/if}<br />
{/section}</p>
<p>{/if}</p>
<p>Just a small addition to make no stars show up if the average is 0 or there has been no comments left yet.<br />
Keep Up The Good Work!<br />
Jonbzode</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: American Patriot</title>
		<link>http://nemops.com/prestashop-product-rating-product-list/comment-page-1/#comment-36377</link>
		<dc:creator><![CDATA[American Patriot]]></dc:creator>
		<pubDate>Thu, 03 Oct 2013 14:58:13 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=1214#comment-36377</guid>
		<description><![CDATA[While I did finally get it to work I have a request from the &quot;I want everything&quot; department.

Is it possible to add, to the right of the stars, the average rating along with the number of reviews in parenthesis, much like the Best Buy website ratings? Something like:

gold star;gold star;gold star;grey star;grey star &lt;strong&gt;3.6 out of 5&lt;/strong&gt; (44 Reviews)

Thanks Nemo for a great tutorial!]]></description>
		<content:encoded><![CDATA[<p>While I did finally get it to work I have a request from the &#8220;I want everything&#8221; department.</p>
<p>Is it possible to add, to the right of the stars, the average rating along with the number of reviews in parenthesis, much like the Best Buy website ratings? Something like:</p>
<p>gold star;gold star;gold star;grey star;grey star <strong>3.6 out of 5</strong> (44 Reviews)</p>
<p>Thanks Nemo for a great tutorial!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: American Patriot</title>
		<link>http://nemops.com/prestashop-product-rating-product-list/comment-page-1/#comment-36146</link>
		<dc:creator><![CDATA[American Patriot]]></dc:creator>
		<pubDate>Tue, 01 Oct 2013 02:53:32 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=1214#comment-36146</guid>
		<description><![CDATA[Does this work in Prestashop 1.5.5? Regardless of what I try I can&#039;t get it to work. When I place the code in the productcomments.php file, create the product-list.tpl file, and refresh my page all I get is a blank page in Firefox and Chrome just says &quot;Server error&quot;. 

I copied the code that Juda provided and added it just above the last } in my productcomments.php file. Am I doing something wrong?

Thanks!]]></description>
		<content:encoded><![CDATA[<p>Does this work in Prestashop 1.5.5? Regardless of what I try I can&#8217;t get it to work. When I place the code in the productcomments.php file, create the product-list.tpl file, and refresh my page all I get is a blank page in Firefox and Chrome just says &#8220;Server error&#8221;. </p>
<p>I copied the code that Juda provided and added it just above the last } in my productcomments.php file. Am I doing something wrong?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PascalVG</title>
		<link>http://nemops.com/prestashop-product-rating-product-list/comment-page-1/#comment-35475</link>
		<dc:creator><![CDATA[PascalVG]]></dc:creator>
		<pubDate>Thu, 26 Sep 2013 16:49:37 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=1214#comment-35475</guid>
		<description><![CDATA[Hi Nemo,

Tiny detail, which caused some problem to someone on the forum:

Quote:
&lt;i&gt;Step 3 – Creating the hooking function
So, we have our hook. Let’s test it out. &lt;strong&gt;At the end&lt;/strong&gt; of productcomments.php create a new function
&lt;/i&gt;

They took your suggestion a little too literally, and added it fully at the end of the file, OUTSIDE the class...

So, we have to make sure it&#039;s JUST ABOVE the very last &quot;}&quot;, to keep the function INSIDE the class, to make it part of it:


&lt;i&gt;add our code here&lt;/i&gt;
}
-- END OF FILE--


Hope this helps,
pascal]]></description>
		<content:encoded><![CDATA[<p>Hi Nemo,</p>
<p>Tiny detail, which caused some problem to someone on the forum:</p>
<p>Quote:<br />
<i>Step 3 – Creating the hooking function<br />
So, we have our hook. Let’s test it out. <strong>At the end</strong> of productcomments.php create a new function<br />
</i></p>
<p>They took your suggestion a little too literally, and added it fully at the end of the file, OUTSIDE the class&#8230;</p>
<p>So, we have to make sure it&#8217;s JUST ABOVE the very last &#8220;}&#8221;, to keep the function INSIDE the class, to make it part of it:</p>
<p><i>add our code here</i><br />
}<br />
&#8212; END OF FILE&#8211;</p>
<p>Hope this helps,<br />
pascal</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SUNN78</title>
		<link>http://nemops.com/prestashop-product-rating-product-list/comment-page-1/#comment-34245</link>
		<dc:creator><![CDATA[SUNN78]]></dc:creator>
		<pubDate>Mon, 16 Sep 2013 12:49:41 +0000</pubDate>
		<guid isPermaLink="false">http://nemops.com/?p=1214#comment-34245</guid>
		<description><![CDATA[Sorry, It was my fault...

I copied wrong the product-list.tpl

Now works fine

thanks]]></description>
		<content:encoded><![CDATA[<p>Sorry, It was my fault&#8230;</p>
<p>I copied wrong the product-list.tpl</p>
<p>Now works fine</p>
<p>thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>
