• Resolved mcfosat

    (@mcfosat)


    Greetings Blocksy people!

    I would like to display the average rating of my current product review in Elementor by using their Star Rating Widget with the Dynamic Tags functionality.

    The problem is that, I can’t find any field that contains this data in a format like “4.6”.

    As a workaround I ended up creating a shortcode that writes out the HTML of the rating with the “blocksy_get_product_review_overall_score” function like this:

    add_shortcode('blocksy_overall_score', function () {
        $id = get_the_ID();
        $output = '';
    
        if (function_exists('blocksy_get_product_review_overall_score') && $id) {
            $output = blocksy_get_product_review_overall_score($id);
        }
        echo $output;
    });

    In a similar way, I could also create a shortcode that returns the rating in number format.

    Do you have a better idea? Perhaps could you introduce additional shortcodes to return the overall scores, as well?

Viewing 1 replies (of 1 total)
  • Hello @mcfosat

    This actually looks like a good implementation, so congrats for figuring out how our code works.

    Unfortunately, we do not have any immediate plans for the Product Reviews extension. Though, I will note your request down in our to-do list for a possible future release.

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Product Reviews – how to get the overall rating’ is closed to new replies.