• Resolved marekvbeek

    (@marekvbeek)


    Dear Gemini Labs,

    I would like to know how I can display Review Stars & Review Count on my WooCommerce shop page of my webshop. So every product on the shop page has it’s review stars & counts shown.

    How do I do this?

    Kind regards,

    Marek

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter marekvbeek

    (@marekvbeek)

    Edit: I have added now the site reviews stars via WooCommerce Booster plugin. But the problem is that I can only show all the reviews for all the product, not the specific reviews for every specific product.

    Plugin Author Gemini Labs

    (@geminilabs)

    While Site Reviews does not yet provide a one-click integration with Woocommerce, it is relatively simple to do so.

    a. Since your products each have a unique post ID, the bast way is to auto-assign your reviews directly to your products (if you needed to assign your reviews to something that did not have a post ID, then you could instead assign to categories).

    b. If you are assigning reviews to products, then for performance reasons you should not be also assigning them to categories; only assign to one or the other).

    c. To avoid repetition, you can use the do_shortcode function to place these shortcodes directly inside your product templates.

    See also:

    https://www.hostinger.com/tutorials/wordpress-do_shortcode
    https://docs.woocommerce.com/document/template-structure/

    Here are the shortcodes you would use:

    1. This is how to display the submission form, the assign_to option will auto-assign submitted reviews to the product that the form is displayed on:

    [site_reviews_form assign_to=post_id]
    

    2. This is how to display your submitted reviews, the assigned_to option will tell Site Reviews to only display reviews that have been assigned to the current product page:

    [site_reviews assigned_to=post_id pagination=ajax]
    

    3. This is how to show the rating summary of the product, the assigned_to option will tell Site Reviews to only display a summary of the reviews that have been assigned to the current product page:

    [site_reviews_summary assigned_to=post_id]
    

    For more detailed help with the shortcode options, please refer to the “Site Reviews > Help > Shortcodes” page.

    Thread Starter marekvbeek

    (@marekvbeek)

    Thank you for the quick reply.
    Yes I’ve put all the reviews into categories.
    However… with your explanation I still don’t understand how I get only the Star rating under every product title on the Shop Page.
    I get everything on the single product page because I use the shortcode in the product summary and product description.
    But how do I get the Star Reviews & Review count on the Shop Page where multiple products are shown?

    Plugin Author Gemini Labs

    (@geminilabs)

    To do this, you have two options:

    Option 1. Use a custom woocommerce “loop/rating.php” template and edit it like this:

    This:

    if (!wc_review_ratings_enabled()) {
        return;
    }

    Becomes this:`

    if (!wc_review_ratings_enabled()) {
        echo do_shortcode('[site_reviews_summary assigned_to='.$product->get_id().' hide=bars,summary,if_empty]');
        return;
    }

    See also: https://docs.woocommerce.com/document/template-structure/

    Option 2: https://pastebin.com/0Bn8fnZe

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Show Reviews Stars on Shop Page’ is closed to new replies.