Users generally don’t click on the Review Tab unless we say there are some Reviews available like showing a count of Reviews. Ex : Reviews(2) or Reviews(3) like that.
Since the data isn’t available outside of the reviews panel, the easiest way would be write it out as a JS variable and then use that onload to populate the tab’s label.
Say your heading DIV has ID ‘reviews-heading’. You can add this script tag to the reviews panel:
Where should we add the function?
$(function() { if (nReviewCount !== undefined) { $(‘reviews-heading’).text(‘Customer Reviews (’+nReviewCount+‘)’) } } )
You said to add it in the footer. Do u mean the main Footer Template? Don’t we need to add anything on the Product Page as that is where we show the Reviews?
We recently added new tags that will allow you to show the quantity and the average rating in any place of the product page.
If you are using the reviews coming from the customers, these are the variables: product['product_rating_customer'] and product['product_rating_count']
If you have products using the PAM reviews and the customers reviews, this is the code you need to use:
{if (product['product_rating_count'] ne 0)}
Review: {product['product_rating_customer']} / 5 ({product['product_rating_count']} votes)
{elseIf (product['product_rating'] ne 0)}
Review: {product['product_rating']} / 5
{endIf}
You can use the same image you use in the review panel if you prefer it.
Best regards,
Belén