Modular Merchant
QuickCode™ Glossary
{REVIEW-TOGGLE-DISPLAY-TAG}
QuickCode Tag Glossary Home
See also:
Knowledge Base
Articles in this category:
{FIELD-REVIEW-CRITERIA-MENU}

{FIELD-REVIEW-CRITERIA}

{FIELD-REVIEW-DETAILS}

{FIELD-REVIEW-SORT}

{IF-CUSTOMER-HAS-VOTED-ON-REVIEW-BEGIN}

{IF-CUSTOMER-HAS-VOTED-ON-REVIEW-END}

{IF-REVIEW-CRITERIA-BEGIN}

{IF-REVIEW-CRITERIA-END}

{IF-REVIEWER-AUTHORIZED-BEGIN}

{IF-REVIEWER-AUTHORIZED-END}

{IF-REVIEWS-BEGIN}

{IF-REVIEWS-END}

{IF-USING-PRODUCT-REVIEWS-BEGIN}

{IF-USING-PRODUCT-REVIEWS-END}

{NUMBER-OF-REVIEWS}

{REVIEW-AUTHOR}

{REVIEW-AVERAGE-RANK}

{REVIEW-BLOCK-BEGIN}

{REVIEW-BLOCK-END}

{REVIEW-COMPOSITE-RANK}

{REVIEW-CREATE-DATE}

{REVIEW-CRITERIA-BLOCK-BEGIN}

{REVIEW-CRITERIA-BLOCK-END}

{REVIEW-CRITERIA-DESCRIPTION}

{REVIEW-CRITERIA-NAME}

{REVIEW-CRITERIA-RANK}

{REVIEW-CRITERIA-SID}

{REVIEW-DETAIL}

{REVIEW-SID}

{REVIEW-SUMMARY}

{REVIEW-TOGGLE-DISPLAY-TAG}

{REVIEW-VOTES-HELPFUL}

{REVIEW-VOTES-TOTAL}

{REVIEW-VOTES-UNHELPFUL}

{URL-REVIEW-VOTE-IS-HELPFUL}

{URL-REVIEW-VOTE-IS-UNHELPFUL}

Reviews > {REVIEW-TOGGLE-DISPLAY-TAG}
<< {REVIEW-SUMMARY} {REVIEW-VOTES-HELPFUL} >>
{REVIEW-TOGGLE-DISPLAY-TAG} Updated: 06/26/2013

The {REVIEW-TOGGLE-DISPLAY-TAG} QuickCode Tag may be used to create a link that may be used to toggle between displaying the summary of a product review, or the full text of a product review.

{REVIEW-TOGGLE-DISPLAY-TAG} is typically used in combination with {REVIEW-SUMMARY} and {REVIEW-DETAIL}. With this combination, {REVIEW-SUMMARY} allows the store admin to set a limit on how many characters of the review are displayed by default, and displays the text of the review, up to the set character limit.

If the review is longer than the set character limit, {REVIEW-TOGGLE-DISPLAY-TAG} adds a "Show more" link after the review summary. When the "Show more" link is clicked, {REVIEW-TOGGLE-DISPLAY-TAG} hides the output from {REVIEW-SUMMARY} and shows the output from {REVIEW-DETAIL} instead, so that the full text of the product review is displayed. The "Show more" link is also replaced by a "Show less" link.

When the "Show less" link is clicked, {REVIEW-TOGGLE-DISPLAY-TAG} hides the output from {REVIEW-DETAIL} and shows the output from {REVIEW-SUMMARY} instead, so that the review summary text is displayed again. The "Show less" link is also replaced by a "Show more" link.

Requirements / Prerequisites

The {REVIEW-TOGGLE-DISPLAY-TAG} QuickCode Tag is compatible with the product template (product.tplonly.

{REVIEW-TOGGLE-DISPLAY-TAG} should be placed after {REVIEW-DETAIL}, which should be placed after {REVIEW-SUMMARY}. All three QuickCode Tags should be placed between {REVIEW-BLOCK-BEGIN} and {REVIEW-BLOCK-END}, which should in turn be placed between {IF-REVIEWS-BEGIN} and {IF-REVIEWS-END}.

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):

Example
Hello, and welcome to my store!<br />
{IF-USING-PRODUCT-REVIEWS-BEGIN}
Interested in learning about other customers' opinions of our products? With product reviews, you can read real feedback from real people, before you buy!<br />
{IF-REVIEWS-BEGIN}
{REVIEW-BLOCK-BEGIN}
{REVIEW-SUMMARY:80}{REVIEW-DETAIL}<br />
{REVIEW-TOGGLE-DISPLAY-TAG}<br />

<hr />
{REVIEW-BLOCK-END}
{ELSE}
{PRODUCT-NAME} has not yet been reviewed.<br />
{IF-REVIEWS-END}
{ELSE}
Product reviews are not allowed at this time.<br />
{IF-USING-PRODUCT-REVIEWS-END}
Thanks for shopping!<br />


2. If the store's Product Review Module is enabled, and the "Blue T-Shirt" product has an approved review with text more than 80 characters long, 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!
The Blue T-Shirt is great! It's a little bit bigger than expected but extremely...
Show more.



Thanks for shopping!


3. If the store's Product Review Module is enabled, and the "Blue T-Shirt" product has an approved review with text more than 80 characters long,  and the "Show more" link has been clicked, 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!
The Blue T-Shirt is great! It's a little bit bigger than expected but extremely comfortable. It's made of soft, lightweight cotton, and the color is exactly as shown online!
Show less.



Thanks for shopping!


4. 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!


5. If the store's Product Review Module is disabled, the "Blue T-Shirt" product 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 {REVIEW-TOGGLE-DISPLAY-TAG} QuickCode Tag is changed into the source code below prior to the web page being displayed.
LOG IN TO ADD COMMENTS
  Copyright © 2001 - 2024 Modular Merchant™. All rights reserved.
Modular Merchant | Privacy Policy | Legal Statement | Terms of Service | Contact Us | Site Map