DanyWay Posted April 19, 2020 Share Posted April 19, 2020 (edited) Hi, I have an issue with the productcomment Here you can see 1 star. But I have 17 reviews with all 5 stars. Any idea how to correct to have the right AggregateRating Link to the page : Thanks for the help. Dany Edited April 20, 2020 by DanyWay name delete URL (see edit history) Link to comment Share on other sites More sharing options...
Guest Posted April 20, 2020 Share Posted April 20, 2020 (edited) Didn't you edit the productcomments module? Go to: Advanced Parameters -> Performance 1. Template compilation = Force compilation 2. Smart cache for JavaScript = Disable 3. Save 4. Clear cache (blue button) 5. Template compilation = Recompile templates if the files have been updated 6. Save Edited April 20, 2020 by Guest (see edit history) Link to comment Share on other sites More sharing options...
DanyWay Posted April 20, 2020 Author Share Posted April 20, 2020 Thanks for the help. But it does not work In fact the productcomments module has a productcomments.tpl file with this code for the reviewRating <div class="star_content clearfix" itemprop="reviewRating" itemscope itemtype="https://schema.org/Rating"> {section name="i" start=0 loop=5 step=1} {if $comment.grade le $smarty.section.i.index} <div class="star"></div> {else} <div class="star star_on"></div> {/if} {/section} <meta itemprop="worstRating" content = "0" /> <meta itemprop="ratingValue" content = "{$comment.grade}" /> <meta itemprop="bestRating" content = "5" /> </div> And in the product.tpl I have also code for that {if isset($nbComments) && $nbComments > 0} <div class="comments_note" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"> <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} <meta itemprop="ratingValue" content="{$averageTotal}"> <a class="nb-comments noeffect goreviews" href="#tabsection"><span itemprop="reviewCount">{l s='%s'|sprintf:$nbComments mod='productcomments'}</span> {if isset($nbComments) && $nbComments == 1}{l s='Review'}{else}{l s='Reviews'}{/if}</a> </div> </div> {/if} Maybe one is not right or makes trouble. Thanks for the help Dany 1 Link to comment Share on other sites More sharing options...
Guest Posted April 20, 2020 Share Posted April 20, 2020 Prestashop version ? Link to comment Share on other sites More sharing options...
DanyWay Posted April 20, 2020 Author Share Posted April 20, 2020 sorry I forgor it's : 1.7.3.3 Link to comment Share on other sites More sharing options...
Guest Posted April 20, 2020 Share Posted April 20, 2020 updated module productcomments ? Link to comment Share on other sites More sharing options...
DanyWay Posted April 20, 2020 Author Share Posted April 20, 2020 no way I already made it and it make me too much errors Link to comment Share on other sites More sharing options...
Guest Posted April 20, 2020 Share Posted April 20, 2020 Aren't you using a page builder? You checked the database tables. Link to comment Share on other sites More sharing options...
Guest Posted April 20, 2020 Share Posted April 20, 2020 ps_product_comment ps_product_comment_criterion ps_product_comment_criterion_category ps_product_comment_criterion_lang ps_product_comment_criterion_product ps_product_comment_grade ps_product_comment_report ps_product_comment_usefulness Link to comment Share on other sites More sharing options...
Guest Posted April 20, 2020 Share Posted April 20, 2020 Did you upgrade the Prestashop version? Looks like you've upgraded from Prestashop 1.6 to Prestashop 1.7 Link to comment Share on other sites More sharing options...
DanyWay Posted April 20, 2020 Author Share Posted April 20, 2020 No it's from scratch 1.7 Just change the theme. Before the theme has no rating on the product page, only on the product list This new theme has a rating on product page and it's here where the rating is not good. That's why I thought it's between : productcomments.tpl ; https://schema.org/Rating and product.tpl - talk about http://schema.org/AggregateRating I'm not very aware of that but It seems to be not the same type of Rating Best, Dany Link to comment Share on other sites More sharing options...
Guest Posted April 20, 2020 Share Posted April 20, 2020 Contact the developers templates Ayon. Link to comment Share on other sites More sharing options...
Guest Posted April 20, 2020 Share Posted April 20, 2020 I don't know what mistakes the new version of productcomments 4.0.1 makes to you. You always write a little information. Turn on debug mode and put bugs here etc .... Link to comment Share on other sites More sharing options...
Guest Posted April 20, 2020 Share Posted April 20, 2020 I sent you a list of database tables. Are there all? Link to comment Share on other sites More sharing options...
DanyWay Posted April 20, 2020 Author Share Posted April 20, 2020 yes there are all there Link to comment Share on other sites More sharing options...
Guest Posted April 20, 2020 Share Posted April 20, 2020 If it works in the default skin template, the error is in the Ayon template. As I wrote, you cannot support foreign themes and modules. Contact the Ayon theme developer. Be aware that the template creator may have changed java scripts, etc. More can not advise. Link to comment Share on other sites More sharing options...
DanyWay Posted April 20, 2020 Author Share Posted April 20, 2020 OK I found the issue was on the database one of the table was not populated Link to comment Share on other sites More sharing options...
Guest Posted April 20, 2020 Share Posted April 20, 2020 I wrote it to you to check the tables in the database 😉 Link to comment Share on other sites More sharing options...
K0302195 Posted January 1, 2021 Share Posted January 1, 2021 I have managed to fix all of Google Search Console Issues and Warnings on homepage by adding the below updates. Themes/[Yourthemename]/templates/catalog/_partials/miniatures/products.tpl - Add 'itemscope itemtype="http://schema.org/Product"' to <div class="product-miniature js-product-miniature" data-id-product="{$product.id_product}" data-id-product-attribute="{$product.id_product_attribute}" > - Add itemprop="image" to the product image tag. - Add itemprop="name" to the product -title tag. - Add the following html tags; <div itemprop="brand" itemtype="http://schema.org/Thing" itemscope> <meta itemprop="name" content="{$product.manufacturer_name}" /> </div> <meta itemprop="description" content="{$product.description_short|strip_tags:'UTF-8'}" class="invisible"/> {if isset($product.reference_to_display)} <meta itemprop="sku" content="{$product.reference_to_display}" class="invisible"/> {/if} <meta itemprop="gtin13" content="{$product->ean13|escape:'html':'UTF-8'}" /> <div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="invisible"> <meta itemprop="url" content="{$product.url}" /> <link itemprop="availability" href="http://schema.org/{if $product.quantity > 0}InStock{else}OutOfStock{/if}"> <meta itemprop="priceCurrency" content="{$currency.iso_code}" /> <meta itemprop="price" content="{$product.price_amount}" /> <meta itemprop="priceValidUntil" content="{($smarty.now + (60*60*24*15))|date_format:"%Y-%m-%d"}"> </div> - You may need to repeat the above in the below file; Themes/[Yourthemename]/templates/catalog/_partials/miniatures/products.tpl If you theme support products rating/comments you will need to add the following to; Prestashop/modules/productcomments/productscomments_review.tpl {if $averageTotal > 0 } <div itemprop="aggregateRating" itemscope itemtype="https://schema.org/AggregateRating"> <meta itemprop="ratingValue" content ="{$averageTotal}" /> <meta itemprop="reviewCount" content ="{$nbComments}" /> </div> <div itemprop="review" itemscope itemtype="http://schema.org/Review" class="invisible"> <meta itemprop="author" content="{Configuration::get('PS_SHOP_NAME')}" /> <meta itemprop="datePublished" content="{'Y'|date}-{'m'|date}-{'d'|date}"> <div itemprop="reviewRating" itemscope itemtype="http://schema.org/Rating"> <meta itemprop="worstRating" content="1"/> <meta itemprop="ratingValue" content ="{$averageTotal}" /> <meta itemprop="bestRating" content="5" /> </div> </div> {/if} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now