Tel: 0151 223 0001

We believe in three things: users, users, users.

Virtuemart: editing comment template files

Virtuemart: editing comment template files - brought to you by sdesign1 - Joomla specialists

This article is based around the Virtuemart plugin for Joomla, you will need FTP access and a text editor to edit your template file.

You can enable customer "comments" or "reviews" by logging into the back-end of Joomla:

  • Go to Components > VirtueMart > Configuration
  • and check the "Enable Customer Review/Rating System" option
  • Click "Save"

When a customer leaves a review it show:

  • Their user name
  • The date the comment was made
  • The review 

To edit the template of the customer review, locate the file:

/components/com_virtuemart/themes/ja-zeolite/templates/common/reviews.tpl.php

Here you can edit the template itself, or add in the following variables:

$review['userid'] => The user ID of the comment author
$review['username'] => The username of the comment author
$review['name'] => The name of the comment author
$review['time'] => The UNIX timestamp of the comment ("when" it was posted)
$review['user_rating'] => The rating; an integer from 1 - 5
$review['comment'] => The comment text

Remember to Save and Upload your file when you finished editing. Your changes will be noticeable as soon as you refresh the page.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Fill in the blank