The purpose of this article
Testimonial Tree provides a simple widget that displays the average rating with the amount of star icons and provides a link to view the testimonials that are used to generate this aggregate score.
If you have a products page with several different types of products and you want to use this widget to display the aggregate score for each product. This article explains how to set this up.
After you've created the Aggregate Widget, navigate to Widgets -> Manage Widgets, by using the side panel in the Testimonial Tree dashboard. In widget management page you will see a gear icon all the way to right of the table. Click on that gear icon for the Aggregate widget you just created.
You should now see a page with a header labeled "Advanced Settings", scroll towards the bottom of the settings, and you should see a setting labeled "Use For Products Page (Multiple Divs)", you want to click on the drop down and select the "Yes" option.
Adding Widget To Products Page
The next step is to include the widget in your product page. First you want to grab the widget code for the aggregate widget. You can locate this in the same page you found the gear icon for advanced settings, listed in the column "Get Code". This will open a modal with the widget code, which should look something like this. The script tag will require some changes to get this working, but for now just copy the code it provides. This is just an example, don't use the code in this article, its just to be used as a sample.
You can insert this anywhere you like in your html for your page, i prefer to add it towards the bottom, that way everything else loads first. Than for each product on the page you also want to insert an extra div tag with an id attribute of the specific meta data field for example product id, product name, or sku for the specific product.
You have to do this for each product, you want the aggregate widget to display for.
The div id must be in this format, it is crucial you use the same exact format or the widget wont work. Again this is just a sample, make sure you are adding in the meta data youre using with the widget.
Now back to the script tag. You need to include a metadata parameter that includes all the products on the page and should be formatted exactly how the bottom example shows it.