Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1128757

    Zach W
    Participant

    It looks like your theme (and all subthemes) override the comments template and leaves out the AggregateRating (https://schema.org/AggregateRating) data that is included by Woocommerce by default and is critical to Google Structured Data.
    Ive tested it out and indeed the data is not displayed anywhere on the product page.

    The data that I dont see displayed comes from the Woocommerce Template wp-content/plugins/woocommerce/templates/single-product/rating.php where you’ll see itemprop="aggregateRating"

    Reviews are displaying fine but I need the “aggregateRating” to be there as well.
    I checked other plugins and they dont seem to be affecting it.

    How can I fix this?

    WP: 4.5.3
    X: 4.6
    WC: 2.5.5

    #1129194

    Darshana
    Moderator

    Hi there,

    Thanks for writing in! Your request is beyond the support we can offer. It seems that WooCommerce Product Reviews Pro plugin does support this type of functionality. Please go through the following resource for more information (https://docs.woocommerce.com/document/woocommerce-product-reviews-pro/#section-17).

    Thanks!

    #1129532

    Zach W
    Participant

    I dont think it is beyond your support.
    There is functionality that is built into Woocoommerce (see the default template file I referenced) and with this theme the functionality is removed.

    Seems like a simple error/miss on your end.

    #1129667

    drvmehta
    Participant

    I just purchased X Theme and facing similar issue. Google structured data tool showing error “Multiple reviews should be accompanied by an aggregate rating.”
    Its critical. Please help.

    #1129719

    Rue Nel
    Moderator

    Hello There,

    Thanks for the updates! Regretfully we did not override or have a custom template in X theme for rating.php. If you go to WooCommerce > System Status > Templates, you will only have these files (http://prntscr.com/c55e51):

    x/woocommerce/cart/cart-empty.php, 
    x/woocommerce/cart/cross-sells.php, 
    x/woocommerce/loop/loop-end.php, 
    x/woocommerce/loop/loop-start.php, 
    x/woocommerce/loop/pagination.php, 
    x/woocommerce/notices/error.php, 
    x/woocommerce/notices/notice.php, 
    x/woocommerce/notices/success.php, 
    x/woocommerce/single-product/product-image.php, 
    x/woocommerce/single-product/product-thumbnails.php, 
    x/woocommerce/single-product/related.php, 
    x/woocommerce/single-product/tabs/tabs.php, 
    x/woocommerce/single-product/up-sells.php, 
    x/woocommerce/single-product-reviews.php

    Unless otherwise you have added a custom woocommerce templates in your child theme and that would be another issue. What have been experiencing may have been caused with version of you WooCommerce. Please make sure that you are using the latest version 2.6.4. Most of the time, outdated theme and plugins will create issues in your site. You can also check out the latest compatible versions here: https://community.theme.co/kb/version-compatibility/

    Hope this helps.

    #1130390

    Zach W
    Participant

    Ive updated all plugins and deactivated all but essential and still the same issues.
    This should be easy to narrow down. Please take a look at https://search.google.com/structured-data/testing-tool/u/0/#url=http%3A%2F%2Fdemo.theme.co%2Fshop-integrity%2Fproduct%2Fflying-ninja%2F
    which is from your demo site. You will notice that the aggregate rating (4 stars avg) is shown on mouse-over of the prouct image on the products archive page already (shown here http://demo.theme.co/shop-integrity/)
    However there is no visual display of the average rating anywhere on the actual individual product page.
    Regardless of the schema settings mentioned previously this is an odd ommission, especially if there were dozens of reviews an average is crucial information!

    It shouldnt be much to ask for one of the top themes that claims compatibility with Woocommerce to show an average review score for a product, especially since it is already built into Woocommerce by default.

    #1130530

    Rue Nel
    Moderator

    Hello There,

    Thanks for the updates. I did some further investigations and found out the there is an invalid keyword. It should have been “itemprop=”review” and not “itemprop=”reviewRating”. I already reported this to our developers. Once they fixed it, it will be updated and will be rolled out in our next release update. I do not know which stack you are using so I cannot provide any temporary fix for you at the moment. Would you mind providing me your site url so that I can check your site?

    Thank you.

    #1130807

    Zach W
    Participant

    Thanks for the quick reply.
    Here is a dev site with the latest updates and minimal plugins installed (integrity) https://dev.strictlyracingdrones.com/shop/electronics/x-racer-f303-flight-controller/

    Also in the next fix will there be a way to show the average product rating to the user?

    #1130827

    Christian
    Moderator

    Hey Zach,

    Could you also try switching to the default WordPress theme and see if the issue persists so we know if this is an issue with X?

    We could not guarantee or promise that the feature “average product rating” would be included.

    Thanks.

    #1130852

    Zach W
    Participant

    You can try that link again (https://dev.strictlyracingdrones.com/shop/electronics/x-racer-f303-flight-controller/#reviews) I have installed the default twenty sixteen theme.

    The average rating shows up as expected and the structured data is there without errors

    #1130853

    Zach W
    Participant

    You can try that link again (https://dev.strictlyracingdrones.com/shop/electronics/x-racer-f303-flight-controller/#reviews) I have installed the default twenty sixteen theme.

    The average rating shows up as expected and the structured data is there without errors

    #1130879

    Rupok
    Member

    Would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password
    – FTP credentials

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1131919

    Zach W
    Participant

    Sorry I won’t be able to do that. I linked to your demo site and every other site running X theme has the same issues so there’s no need to mess around with my site.

    It should be obvious what the problem is and how to fix it. The default and every other theme has this functionality.

    #1132166

    Christian
    Moderator

    Hey Zach,

    Let’s try this. Please add the code below in your functions.php

    add_action('after_setup_theme','woocommerce_default');
    
    function woocommerce_default() {
    	remove_action( 'woocommerce_before_shop_loop_item_title', 'x_woocommerce_shop_product_thumbnails', 10 );
    	add_action( 'woocommerce_before_shop_loop_item_title', 'x_woocommerce_shop_product_thumbnails_fix', 10 );
    }
    
    function x_woocommerce_shop_product_thumbnails_fix() {
    
      GLOBAL $product;
    
      $id     = get_the_ID();
      $thumb  = 'entry';
      $rating = $product->get_rating_html();
    
      woocommerce_show_product_sale_flash();
      echo '<div class="entry-featured">';
        echo '<a href="' . get_the_permalink() . '">';
          echo get_the_post_thumbnail( $id, $thumb );
          if ( ! empty( $rating ) ) {
            echo '<div class="star-rating-container aggregate" itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">' . $rating . '</div>';
          }
        echo '</a>';
      echo "</div>";
    
    }

    Let us know how it goes.

    #1132850

    Zach W
    Participant

    It doesnt look like that fixed anything.
    Just to be clear the main issue is on the individual product page, not the category or other archive page. Your fix looks like it is aimed at the thumbnail overlay on the category page.