store.reviews

Available Since: V2.0.0

Chunk used to format product reviews.

<div class="productReviews">
    [[comments.microdataRating]]    <p>[[+reviewsLabel]]</p>
    [[comments.show &ratings=`1`]]    <p id="showAllReviews"><a href="[[self]]">[[+showAllReviewsLabel]]</a></p>
    <p id="writeProductReview"><a href="[[self]]">[[+writeReviewLabel]]</a></p>
    [[!comments.submit &verification=`1` &ratings=`1`]]</div>[[javascript &core=`1`]]<script type="application/javascript">
    $fl('#submitcomment').css('display', 'none').attr('aria-hidden', 'true');
    $fl('#showAllReviews').css('display', 'none').attr('aria-hidden', 'true').bind('click', function(e) {
        $fl('.comments li').css('display', 'block').attr('aria-hidden', 'false');
        $fl(this).css('display', 'none').attr('aria-hidden', 'true');
        e.preventDefault();
    });
    $fl('.comments li').each(function(i) {
        if(i > 2) {
            $fl(this).css('display', 'none').attr('aria-hidden', 'true');
            $fl('#showAllReviews').css('display', 'block').attr('aria-hidden', 'false');
        }
    });
    $fl('#writeProductReview').bind('click', function(e) {
        $fl('#submitcomment').css('display', 'block').attr('aria-hidden', 'false');
        $fl(this).css('display', 'none').attr('aria-hidden', 'true');
        e.preventDefault();
    });
    if(!$fl('#submitcomment').length)
        $fl('#writeProductReview').css('display', 'none').attr('aria-hidden', 'true');
</script>
Placeholder Description
reviewsLabel The label for the review block.
showAllReviewsLabel The label text for show all reviews clickable element.
writeReviewLabel The label text for the clickable write review element.



TOP