Skip to content
Everett Griffiths edited this page Jun 19, 2014 · 1 revision

writeReview

This is the Snippet used to generate a form to the front-end. Reviews can include full text reviews (e.g. "this product is awesome!"), or they can be a simple "star" review where the user simply rates the product as a number (the database supports 1 - 100). The writeReview snippet should handle both cases easily. System Setting moxycart.enable_reviews must be set to "Yes" for this to work.

Available Paramaters

  • @param &public (boolean) default is zero. If 1 (true), then any public user can leave a review. If the review is not public, then the user must be logged in, otherwise we show a message.
  • @param &publicTpl (string) Chunk name for the message to show if public=0 and the user is not logged in. E.g. "You must log in to leave a review."
  • @param &tpl (string) -- include 2 default options: one for "start" where a simple star rating is included, or "text"
  • @param &auto_approve_reviews (boolean) -- defaults to system setting moxycart.auto_approve_reviews. Default is false: that means the admin must approve the reviews manually.

Sample Usage

  • [[writeReview? &tpl=MoxycartProductFullReview &product_id=[[+product_id]]]]

Success and error messages Placeholder

[[+moxy.review_success_msg]] and [[+moxy.review_error_msg]]

Clone this wiki locally