The {FIELD-REVIEW-SORT} QuickCode Tag may be used within the product review section of the product template, to create a dropdown menu with several different sort options for the product's reviews. The available sort options are as follows:
author name (A-Z)
author name (Z-A)
date (newest to oldest)
date (oldest to newest)
# of helpful votes (most to least)
# of helpful votes (least to most)
rank (highest to lowest)
rank (lowest to highest)
Requirements / Prerequisites
The {FIELD-REVIEW-SORT} QuickCode Tag creates an HTML input (the dropdown menu to select the review sort order), but unlike most other QuickCode Tags that create HTML inputs, {FIELD-REVIEW-SORT}does not need to be inserted within a valid HTML form.
{FIELD-REVIEW-SORT} is compatible with the product template (product.tpl) only.
It is recommended to always place any content related to product reviews between the {IF-USING-PRODUCT-REVIEWS-BEGIN} and {IF-USING-PRODUCT-REVIEWS-END} QuickCode Tags, so that the content will be shown when the store's Product Reviews Module is enabled, but hidden if the store's Product Reviews Module is disabled.
Example of Use
1. Add the following to the store's product template (product.tpl):
2. If the store's Product Review Module is enabled, and the "Blue T-Shirt" product has at least one approved review, the "Blue T-Shirt" product page will display the following:
Example Hello, and welcome to my store!
Interested in learning about other customers' opinions of our products? With product reviews, you can read real feedback from real people, before you buy!
Reviews for Blue T-Shirt....
Thanks for shopping!
3. If the store's Product Review Module is enabled, but the "Blue T-Shirt" product does not have at least one approved review, the "Blue T-Shirt" product page will display the following:
Example Hello, and welcome to my store!
Interested in learning about other customers' opinions of our products? With product reviews, you can read real feedback from real people, before you buy!
Blue T-Shirt has not yet been reviewed.
Thanks for shopping!
4. If the store's Product Review Module is disabled, the corresponding storefront page will display the following:
Example Hello, and welcome to my store!
Product reviews are not allowed at this time.
Thanks for shopping!
Source Code
Source Code Updated:
When a web page using a template that contains this QuickCode Tag is viewed in the storefront, the {FIELD-REVIEW-SORT} QuickCode Tag is changed into the source code below prior to the web page being displayed.