Announcement

Collapse
No announcement yet.

Product Reviews by Tess Breakdown Display

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • lesliekirk
    replied
    Originally posted by heatherwebdev View Post
    add this to the style of the div that holds the breakdown elements

    HTML Code:
    style="display: flex; flex-direction: column-reverse;"
    OMG!!! Thank you - so easy peasy - thank you!

    Leave a comment:


  • heatherwebdev
    replied
    add this to the style of the div that holds the breakdown elements

    HTML Code:
    style="display: flex; flex-direction: column-reverse;"

    Leave a comment:


  • Nick
    replied
    lesliekirk the variable l.settings:breakdown:rating within the foreach loop are the numbers 1-5. To reverse them you would just use the QuickSortArray MivaScript function before the foreach loop.

    Code:
    <mvt:do file="g.module_library_utilities" name="l.null" value="QuickSortArray(l.settings:tgr:breakdown, ':rating',-1)" />
    Putting that before the foreach loop will sort the ratings in reverse order.

    Leave a comment:


  • lesliekirk
    replied
    Just an FYI - changing this

    FHdWVa.png
    did not change this

    CA3Ted.png

    Leave a comment:


  • lesliekirk
    replied
    Originally posted by Nick View Post
    lesliekirk that template is available in Settings > System Extension Settings > Product: Reviews Settings under the Reviews Template tab:

    reviews.png
    Yes, I know, but I don't quite see what controls the display order:

    Code:
    <mvt:foreach iterator="breakdown" array="tgr:breakdown">
    <mvt:assign name="l.settings:breakdown:percent" value="( l.settings:breakdown:count / l.settings:tgr:review_count ) * 100" />
    <div class="tgreviews-breakdown">
    <div class="tgreviews-breakdown__rating">
    <mvt:if expr="l.settings:breakdown:count GT 0">
    <span><a href="&mvte:tgr:link;?TGR_Sort=&mvta:global:TGR_So rt;&TGR_Show_Rating=&mvta:breakdown:rating;" title="View Reviews with a rating of &mvte:breakdown:rating;">&mvte:breakdown:rating ;</a></span>
    <mvt:else>
    <span>&mvte:breakdown:rating;</span>
    </mvt:if>
    <span class="tgreviews-breakdown__star"><span class="u-icon-star-full"></span></span>
    </div>
    <div class="tgreviews-breakdown__percent" title="&mvte:breakdown:count; Reviews out of &mvte:tgr:review_count; are rated &mvte:breakdown:rating;">
    <div class="tgreviews-breakdown__percentage">
    <div class="tgreviews-breakdown__percentage-overlay" style="width: &mvte:breakdown:percent;%;"></div>
    </div>
    </div>
    
    <div class="tgreviews-breakdown__count" title="&mvte:breakdown:count; Reviews out of &mvte:tgr:review_count; are rated &mvte:breakdown:rating;">
    &mvte:breakdown:count;
    </div>
    </div>
    </mvt:foreach>
    The link within this code will display a specific set of reviews if you click the star. I think I understand that this calculates the percentage:

    Code:
    <mvt:assign name="l.settings:breakdown:percent" value="( l.settings:breakdown:count / l.settings:tgr:review_count ) * 100" />
    I also see in the "Sort By", which is initially configured in the Review Settings > Default Sorting Method

    That made me wonder if something from that section of code could be used. That is when I figured I would post to the forum to see if anyone else had come up against this...

    Leave a comment:


  • Nick
    replied
    lesliekirk that template is available in Settings > System Extension Settings > Product: Reviews Settings under the Reviews Template tab:

    reviews.png

    Leave a comment:


  • lesliekirk
    started a topic Product Reviews by Tess Breakdown Display

    Product Reviews by Tess Breakdown Display

    Is there a way to change the Breakdown Display in the Reviews Template for the Product Reviews Version 2.012 module? Currently, it's displaying 1-5. I need it to be 5-1

    emuTXt.png

Working...
X