premanshu Posted October 11, 2012 Share Posted October 11, 2012 Just walking through the code of productcomments module in 1.5 I see that we can add support for rich snippets for votes on product page. Please let me know if this is the optimal way or something else is needed. I tested the url on rich snippets tool and it is getting parsed by the toot and votes are correctly displayed. Edit file: productcomments-extra.tpl Change: <div id="product_comments_block_extra"> {if $nbComments != 0} <div class="comments_note"> <span>{l s='Average grade' mod='productcomments'} </span> <div class="star_content clearfix"> {section name="i" start=0 loop=5 step=1} {if $averageTotal le $smarty.section.i.index} <div class="star"></div> {else} <div class="star star_on"></div> {/if} {/section} </div> </div> {/if} To: <div id="product_comments_block_extra"> {if $nbComments != 0} <div class="comments_note"> <span>{l s='Average grade' mod='productcomments'} </span> <div class="star_content clearfix"> {section name="i" start=0 loop=5 step=1} {if $averageTotal le $smarty.section.i.index} <div class="star"></div> {else} <div class="star star_on"></div> {/if} {/section} </div> </div> </br> <span class="hreview-aggregate"> <span class="rating"> <span class="average">{$averageTotal}</span> out of <span class="best">5</span> based on <span class="votes">{$nbComments}</span> comment{if $nbComments > 1}s{/if} <span class="summary"></span> </span> </span> {/if} ***All credits goes to various free modules posted in this forum. I just learnt through understanding coding by various developers sharing their efforts to community. 2 Link to comment Share on other sites More sharing options...
seog Posted October 12, 2012 Share Posted October 12, 2012 thank you very much for share this code, it works fine!! Do you know what code add to productcomments-extra for display images like this ? best regards Link to comment Share on other sites More sharing options...
premanshu Posted October 12, 2012 Author Share Posted October 12, 2012 (edited) I tried this already but not able to get photo with review. However one thing I noticed that we should use <span class="count"> in place of <span class="votes"> in above code as this is more appropriate. The stars are on basis of reviews and not votes. Edited October 12, 2012 by premanshu (see edit history) Link to comment Share on other sites More sharing options...
seog Posted October 20, 2012 Share Posted October 20, 2012 Anyone knows what code add for display product image? regards Link to comment Share on other sites More sharing options...
need4speed Posted November 25, 2012 Share Posted November 25, 2012 Thank you for sharing any news regarding the product image ? Link to comment Share on other sites More sharing options...
need4speed Posted November 25, 2012 Share Posted November 25, 2012 Actually I only thing you can show an image if you add the author tag. Link to comment Share on other sites More sharing options...
aliyev.oka Posted December 9, 2013 Share Posted December 9, 2013 hi everybody!where can i download product comments block extra modul ??? Link to comment Share on other sites More sharing options...
Recommended Posts