This page describes the tags of these four templates. Displaying existing ratings and changing the nickname have their own pages.
- Guide: Description of the product rating module
- Reference: PRODRATING- (Displaying ratings)
- Reference: PRODRATING- (Changing the nickname)
The product rating module is a separate module with its own templates. These templates run either directly or embedded in the shop via
WS-ExtInclude. Which of the two operating modes you use changes the behavior of some tags. The affected places are named below in each case.Building the form
The input form needs a target and six fields: nickname, email address, heading, comment, score and the submit button.
The nickname and email address come from the address data prefix.
Reference:
A-NickName_input, A-NickName_value, A-E-Mail_input and A-E-Mail_value on the page A- (Billing address)
The heading holds a maximum of 256 characters, the comment a maximum of 10,000 characters.
In include mode, the shop system outputs the two
_value tags HTML-safe. When run directly, the content appears unchanged. Therefore, do not rely on entered text being masked in every case.The score
The rating ranges from one to ten points. For each point value, there is an HTML value and an image, plus the currently selected value in two versions.PRODRATING-Rating_value is the plain number, PRODRATING-Rating_htmlvalue is the value that the form submits. For a preselected selection field, you need the HTML value; for a display, the number.You determine how many points you offer through the number of fields in the template. The module knows ten; a template with five stars simply uses only
PRODRATING-RatingPoint1 to PRODRATING-RatingPoint5.The images for the point values and the image for the average rating are defined in the
ProductRatingImages and AdvancedProductRatingImages sections of the configuration, respectively.- Reference:
ProductRatingImagessection - Reference:
AdvancedProductRatingImagessection
Reporting input errors
If something is wrong with the entries, the module indicates this in three ways: as text, as a list and per field as a flag for styling.The three
_error_flag tags output nothing more than the two strings ok and err. They are intended as part of a CSS class name, as in the example. You append the flag to a fixed class name and then style input_ok and input_err differently. For the explanation, the previous documentation refers to a section further down that does not exist on the page.The range
PRODRATING-InputError does not depend on whether an error text is stored, but on whether the entry was incorrect. An empty error text in the configuration therefore does not hide the area; it displays it empty.PRODRATING-Nickname_error_flag also reports err if the buyer has just requested that their nickname be sent. This is not an input error but an indication that something still needs to be done at this point.The error text comes from the
Error parameter of the module configuration.Multiple ratings
If only one rating per person and product is allowed in the shop, a range hides the form and explains the reason.PRODRATING-MultipleInput_error exists only as a range tag. Place the entire form in the negative range; otherwise, the buyer can submit a second rating, which is subsequently rejected.The nickname
Ratings appear under a nickname. An email address is always bound to exactly one nickname. If the buyer enters an address that is already registered under a different nickname, the module offers two options: having the existing nickname sent by email or changing it.PRODRATING-SendNicknameButton only applies if the entered email address is valid and does not match the entered nickname. Only then does the notice make sense, not before.PRODRATING-MinimumNicknameLength is permitted in all templates of the module and is suitable for a notice next to the input field.The button for changing leads to the ChangeNickname template. Its tags are on a separate page.
Displaying the submitted rating
On the Confirm, ConfirmMail and MailValidation templates, you show the buyer what they submitted.The date for search engines
For microdata, search engines need the date in individual components.PRODRATING-Date_year always outputs the year with four digits. An argument is accepted but not evaluated.Confirmation by email
So that nobody can submit a rating under someone else’s name, the module sends an email with a confirmation link. Only after clicking it does the rating count.A confirmation link can be clicked several times.
PRODRATING-RatingAlreadyConfirmed distinguishes the first click from every subsequent one, so that the page does not show the same thank-you twice.Back to the shop
The product number and product index are available in all templates on this page via
PR-Number and PR-ProdIndex. You can get further product data with PR-AdvData().General error message
PRODRATING-Error outputs the general error message of the module and applies as a range tag if there is one. It is permitted in the Edit and ChangeNickname templates.
The tags at a glance
The
_input tags output fixed HTML names and are therefore never empty. Their range therefore always applies and provides no benefit.
Related topics
- Guide: Description of the product rating module
- Guide: Configuring the product rating module
- Reference: PRODRATING- (Displaying ratings)
- Reference: PRODRATING- (Changing the nickname)
- Reference: RATEREMINDMAIL- (Rating reminder)
