EKM Tag: [ekm:customerreviews]
This tag allows you to output customer reviews for the product you are currently viewing. Reviews display with a star rating, customer name and description of the review.
This tag can only be used if the "Customer Reviews" feature has been installed on your EKM shop.
- Tag Information
- Nesting This Tag
- Examples
[ekm:customerreviews][/ekm:customerreviews]
Customer Reviews
Write an online review and share your thoughts with other shoppers!
Reviewer: John Slater from United Kingdom
Really fast delivery and great product.
[ekm:customerreviews]
show='auto';
editbuttonposition='right';
id='auto';
html_before='<div id="customer-reviews"><h2>Customer Reviews</h2><p><a href="[url]">Write an online review</a> and share your thoughts with other shoppers!</p>';
html_review='<p>[reviewer]-[location]-[stars]</p><p>[review]</p>';
html_no_reviews='<p>Be the first to <a href="[url]">review this product</a></p>';
html_after='</div>';
limit='10';
orderby='date ASC';
[/ekm:customerreviews]
show='auto'';
Specify whether or not you want the customer review tag to display. This should be left as "auto" typically so that if the feature is uninstalled it will be removed from the website automatically.
editbuttonposition='inline';
When logged in you will see edit buttons beside the reviews allowing you to remove them. This attribute allows you to specify where those edit buttons will appear.
id='auto';
The product review tag can be used throughout your website, this attribute allows you to specify which product's reviews you wish to display. If on the product page you can specify auto
which will use the current product's ID.
This attribute can also be set to output all customer reviews on a given shop. This is useful when wanting to have a reviews page where all reviews can be output.
html_before='<div id="customer-reviews"><h2>Customer Reviews</h2><p><a href="[url]">Write an online review</a> and share your thoughts with other shoppers!</p>';
This attribute allows you to specify any HTML content you wish to display before the reviews are output. This would typically be a "customer reviews" header and link to allow users to write their own reviews.
This attribute allows you to nest some attribute tags to output review information or links.
Supports conditional tokens.
html_review='<p>[reviewer]-[location]-[stars]</p><p>[review]</p>';
This attribute allows you to specify any HTML that will be output for each of the customer reviews.
This attribute allows you to nest some attribute tags to output review information.
html_no_reviews='<p>Be the first to <a href="[url]">review this product</a></p>';
This attribute allows you to specify any HTML content you wish to display if there are no reviews to display. This would typically be a message asking for customers to leave a review.
This attribute allows you to nest some attribute tags to output review information or links.
html_after='</div>';
This attribute allows you to specify any HTML content you wish to display after the reviews are output. This would typically any closing tags to any HTML opened in html_before
This attribute allows you to nest some attribute tags to output review information or links.
limit='10';
Specify the number of reviews you would like to display on this page.
orderby='rating DESC, date DESC';
Specify the order in which you wish your reviews to display. This could be useful if you wanted only positive reviews to appear first.
include_rich_snippet='no';
Sets whether the tag will output with rich snippets or not. By default they will output.
It is recommended that you only turn off rich snippets when you use this tag more than once on a page.
newline_replace='<br/>';
Outputs when there is a new line in a review's content.
The EKM system allows for some tags to be nested within other tags.
When nesting this tag you do need to ensure the start and end of the tag are prefixed with nested_
and that all single quotes '
are replaced with "
double quotes.
[ekm:showdata]
...
data='products';
location='auto';
output_item='
[ekm:nested_customerreviews]
show="auto";
editbuttonposition="right";
id="[id]";
html_before="";
html_review="<p>[reviewer]-[location]-[stars]</p><p>[review]</p>";
html_no_reviews="";
html_after="";
limit="10";
orderby="date ASC";
[/ekm:nested_customerreviews]
';
...
[/ekm:showdata]
It may be useful for you to have a customer reviews page on your website. Perhaps you want to show a long list of reviews for products on one page, perhaps you want to call this a customer "testimonials" page.
In this example you can output all the reviews for all the products within a category.
<style type="text/css">
.ib {display:-moz-inline-stack; display:inline-block; zoom:1; *display:inline; vertical-align: middle;}
#reviews-header {font-size: 16px; font-weight: bold; margin: 0 0 10px; color: #0082ad; padding: 10px 0;}
#customer-reviews {}
#customer-reviews .item {}
#customer-reviews .item-name {font-size: 14px; font-weight: bold; margin: 0 0 5px;}
#customer-reviews .item-name a {text-decoration: none;}
#customer-reviews .item-image {width: 140px; border: 1px solid #efefef; border-radius: 3px;}
#customer-reviews .item-info {width: 560px; margin: 0 0 0 20px; font-size: 11px;}
#customer-reviews .item-price {margin: 5px 0 0; font-size: 14px; font-weight: bold; color: #ad0062;}
#customer-reviews .item-reviews {margin: 0 0 0 70px; padding: 10px 10px 30px; border-left: solid 3px #efefef;}
#customer-reviews .item-review {margin: 5px 10px; background: #f4f4f4; border-radius: 3px; border: solid 1px #e7e7e7; padding: 10px; font-size: 11px; color: #666;}
#customer-reviews .item-review-text {font-size: 12px; font-style: italic; color: #111;}
#customer-reviews .item-review-info {margin: 10px 0 0;}
#customer-reviews .item-review-info .text {line-height: 20px; margin: 0 10px 0 0;}
#customer-reviews .item-review-info .stars {padding: 0 0 1px;}
</style>
[ekm:showdata]
data='products';
location='58';
cols='1';
rows='999';
page_navigation='auto';
orderby='orderlocation, name';
skiprecords='0';
excludelist='';
includelist='';
editbuttons='YES';
counterreset='4';
image_ratio='140';
image_width='auto';
image_height='auto';
font_formatting='no';
output_start='<div id="customer-reviews"><div id="reviews-header">Customer Reviews</div>';
output_row_start='<div class="row cf">';
output_column_start='';
output_item='
<div class="item i-[counter]">
<div class="item-image ib">[image]</div>
<div class="item-info ib">
<div class="item-name">[name]</div>
<div class="item-short-description">[shortdescription]</div>
<div class="item-price">[price]</div>
<div class="item-rrp">[rrp]</div>
</div>
[ekm:nested_customerreviews]
show="auto";
editbuttonposition="right";
id="[id]";
html_before="<div class="item-reviews">";
html_review="
<div class="item-review">
<div class="item-review-text">[review]</div>
<div class="item-review-info"><span class="ib text">Left By [reviewer] from [location]</span><span class="ib stars">[stars]<span></div>
</div>
";
html_no_reviews="";
html_after="</div><!-- .item-reviews -->";
limit="5";
orderby="rating DESC";
[/ekm:nested_customerreviews]
</div><!-- .item -->
';
output_column_end='';
output_row_end='</div><!-- .row -->';
output_end='</div><!-- #products -->';
' Element Replace
element_replace='null';
[/ekm:showdata]