shop:on_addProductReview AJAX handler
Defined in |
/modules/shop/classes/shop_actions.php, lines 378-410 |
Author |
LemonStand eCommerce Inc. |
Variable |
Type |
Description |
review_posted |
boolean |
this variable is set after successful review post. |
Supported form field details
¶
rating form field
Specifies a product rating.
The rating should be a number (1-5) or empty value. If you do not need to implement the rating feature, you can skip
this field. You can disable the ratings on the System/Settings/Ratings & Reviews Settings page.
¶
review_title form field
Specifies a review title.
¶
review_author_name form field
Specifies the review author name.
You can hide this field for logged in customers, because if the customer is logged in,
the review author name will match the customer's name.
¶
review_author_email form field
Specifies the review author email address.
You can hide this field for logged in customers, because if the customer is logged in,
the review author name will match the customer's email address.
¶
review_text form field
Specifies the review text.
¶
product_id form field
Specifies the product identifier.
This field is optional if the review form is implemented on the Product Details
page.
¶
redirect form field
An optional URL to redirect the browser to.
¶
no_flash form field
Disables the "Your review has been successfully posted." message.
Possible values: 0, 1. By default the handler puts the message to the flash storage. The message can be displayed with
the flash_message() function.
¶
message form field
An optional flash message text.
Example:
<input type="button" value="Submit" onclick="return $(this).getForm().sendRequest(
'shop:on_addProductReview', {
extraFields: {message: 'Your review has been succesfuly posted'},
update:{'product_page': 'product_partial'}
})"/>
Generated PHP variable details
¶
review_posted variable
boolean $review_posted;
This variable is set after successful review post.
This variable is set only if the browser was not redirected to another page.
|