The {FIELD-REVIEW-DETAILS} QuickCode Tag may be used to create a text area which customers may use to enter the text of a product review.
Requirements / Prerequisites
The {FIELD-REVIEW-DETAILS} QuickCode Tag is compatible with the product template (product.tpl) only.
Since the {FIELD-REVIEW-DETAILS} QuickCode Tag create an HTML input, it must be used within a valid HTML form, which also contains a submit button. The entire form should be placed between {IF-REVIEWER-AUTHORIZED-BEGIN} and {IF-REVIEWER-AUTHORIZED-END}, so that the product review form will only be displayed to authorized customers.
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 sharing your opinion of {PRODUCT-NAME}?<br /> {IF-REVIEWER-AUTHORIZED-BEGIN} <form action="{THIS-PAGE}" method="post" name="sample_review_form">
<p><i>Write your review here:</i><br /> {FIELD-REVIEW-DETAILS}</p>
<p><input name="submit_review" type="submit" value="Submit Review" class="UNIVERSAL-BUTTON" /></p>
</form> {ELSE}
Only customers who have purchased {PRODUCT-NAME} may submit a review. If you've purchased {PRODUCT-NAME}, log in to submit a review:<br />
<form action="{THIS-PAGE}" method="post" name="sample_login_form">
<p><span class="SECTION-TITLE">Email Address:</span> <input name="login_email" size="30" type="text" /></p>
<p><span class="SECTION-TITLE">Password:</span> <input name="login_password" size="30" type="password" /></p>
<p><input name="customer_login" type="submit" value="Log in to your Customer Account" /></p>
</form> {IF-REVIEWER-AUTHORIZED-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 store's Require Purchase? option is set to NO -OR- the current customer is logged in and has purchased the "Blue T-Shirt" product, the "Blue T-Shirt" product page will display the following:
Example Hello, and welcome to my store!
Interested in sharing your opinion of Blue T-Shirt?
Write your review here:
Thanks for shopping!
3. If the store's Product Review Module is enabled, and the store's Require Purchase? option is set to YES -AND- the current customer is not logged in or has not purchased the "Blue T-Shirt" product, the "Blue T-Shirt" product page will display the following:
Example Hello, and welcome to my store!
Interested in sharing your opinion of Blue T-Shirt?
Only customers who have purchased Blue T-Shirt may submit a review. If you've purchased Blue T-Shirt, log in to submit a review:
Email Address:
Password:
Thanks for shopping!
4. 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 {FIELD-REVIEW-DETAILS} QuickCode Tag is changed into the source code below prior to the web page being displayed.