ShopSite Tip – Featured Product Reviews Page

In this post, we are using the ShopSite Product Review module to display a single page containing reviews/testimonials for selected products (or all products depending on catalog size and number of available reviews).

featured reviews example

(click to enlarge)

Merchandising > Custom Templates > Pages/Products

1.  Create a new Product template containing only a [– DEFINE PRODUCT –] section (You will need to manually delete the other DEFINE sections from the template).  Within that section, add the desired Product and Review Information, along with any desired HTML/CSS layout.  For our example, we’ll call this template custom_product_review.sst.

2.  In custom_product_review.sst, add the following lines in the
[– DEFINE PRODUCT –] section:

[– IF REVIEWS –]
[– IF REVIEWS_COUNT_NUMBER EQ 0 –]
#Skip product
[– ELSE –]

[– IF PRODUCT.DisplayMoreInformationPage –]
<a href=”[– PRODUCT.MoreInfoURL –]” title=”[– IF PRODUCT.MoreInformationTitle –][– PRODUCT.MoreInformationTitle –][– ELSE –][– PRODUCT.Name REMOVE_HTML –][– END_IF –]”>[– PRODUCT.Name REMOVE_HTML –] ([– PRODUCT.SKU –])</a>[– ELSE –]<span>[– PRODUCT.Name REMOVE_HTML –] ([– PRODUCT.SKU –])[– END_IF –]
[– REVIEWS_FEATURED –]
[– END_IF –]
[– END_IF –]

Note: The tag [– REVIEWS_COUNT_NUMBER –] is only valid for version v12 and up.  Having it in a v11 template won’t hurt anything, but does not properly test for the existence of product reviews (see note on Step 7 for more details).

3.  Copy your current page template.  The new template will be used to display only product review information.  For our example, we’ll call this template custom_reviews_page.sst.

4.  In the [– DEFINE PAGE –] section of custom_reviews_page.sst, locate the product loop and specify your custom product review template as shown below.

[– LOOP PRODUCTS –]
[– PRODUCT custom_product_review.sst –]
[– END LOOP –]

5.  Create a new page in the back office to display your Reviews.  For our example, we’ll call this page “Featured Reviews“.  In the ‘Text1′ field, add the following CSS in order to hide default repeating store text:

Note: The above CSS changes were based on stock templates.  Additional CSS tweaks may be necessary depending on the layout of your current page templates and the desired output format.

6.  Assign the template custom_reviews_page.sst to the new page “Featured Reviews” (Pages > Edit Page Layout > Template)

7.  Assign one or more products to the new “Featured Reviews” page.

Note: For v11 stores, you should only assign products with reviews, as the code is unable to determine if a review exists.

Utilities > Publish

When your store is regenerated, the “Featured Reviews” page will list the approved reviews for each assigned products.

Helpful Hints:

If your page template is normally set up for multiple columns, you may want to adjust this page to only use a single column (Pages > Edit Page Layout > Columns).

The configuration settings for product review options, such as star rating display, number of stars, date format and number of reviews listed (for each product) are found under Merchandising > Product Reviews > Configure.

Enjoy :)

 

Leave a Reply