Originally posted by Miss Kate
View Post
Code:
<mvt:item name="tgreviews" param="Product_Review_Count( l.settings:product:id, l.settings:product:customfield_values:tgreviews:tg r_review_count )" /> <mvt:if expr="l.settings:product:customfield_values:tgrevi ews:tgr_review_count GT 0"> <mvt:item name="tgreviews" param="Product_Rating( l.settings:product:id, l.settings:product:customfield_values:tgreviews:tg r_rating )" /> </mvt:if> <mvt:item name="tgreviews" param="Product_Review_Count( l.settings:product:id, l.settings:product:customfield_values:tgreviews:tg r_review_count )" /> <mvt:if expr="l.settings:product:customfield_values:tgrevi ews:tgr_review_count GT 0"> <mvt:item name="tgreviews" param="Product_Rating( l.settings:product:id, l.settings:product:customfield_values:tgreviews:tg r_rating )" /> </mvt:if> <mvt:if expr="( l.settings:product:customfield_values:tgreviews:tg r_review_count GT 0 ) AND ( NOT ISNULL l.settings:product:customfield_values:tgreviews:tg r_rating )"> <mvt:item name="tgreviews" param="Product_Rating( l.settings:product:id, l.settings:tgr:avg_rating )" /> <div class="tgreviews-average"> <mvt:assign name="l.settings:star_width" value="( l.settings:product:customfield_values:tgreviews:tg r_rating / 5 ) * 100" /> <span class="tgreviews-average__star" title="&mvte:product:customfield_values:tgreviews: tgr_rating; out of 5."> <span class="u-icon-star-full"></span> <span class="u-icon-star-full"></span> <span class="u-icon-star-full"></span> <span class="u-icon-star-full"></span> <span class="u-icon-star-full"></span> <span class="tgreviews-average__star-overlay" style="width:&mvte:star_width;%;"> <span class="u-icon-star-full"></span> <span class="u-icon-star-full"></span> <span class="u-icon-star-full"></span> <span class="u-icon-star-full"></span> <span class="u-icon-star-full"></span> </span> </span>(&mvte:product:customfield_values:tgreviews:t gr_review_count;) </div> </mvt:if>
Now to figure out how to make the stars on the product page open up the Reviews tab (I did this eons ago, now to just find the code).
Leave a comment: