Announcement

Collapse
No announcement yet.

"Ultimate Product Reviews" coding question

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

    "Ultimate Product Reviews" coding question

    I would like to display "review" when there is only a single review for a product instead of "reviews". For instance, I want it to say "1 review" instead of "1 reviews".

    Is there a conditional statement I can add that will do this if there is only one review?

    Here is my current code from my CTGY layout page:

    Code:
    <mvt:item name="productreviews" PARAM="stars" />
    <br>
    Rating: 
    <mvt:if expr="g.ReviewStars">
    &mvt:global:ReviewStars;
    <mvt:else>
    <i>Not rated yet.</i>
    </mvt:if>
    <mvt:if expr="g.Total_Reviews">
             <small>(&mvt:global:Total_Reviews; reviews)</small>
        </mvt:if>
    Site link: http://www.speakerrepair.com/mm5/merchant.mvc

    Thanks for any help. :)

    Eric

    #2
    Re: &quot;Ultimate Product Reviews&quot; coding question

    Can someone from Sebenza chime in on this as to weather it's possible or not?

    Thanks.

    Comment


      #3
      Re: &quot;Ultimate Product Reviews&quot; coding question

      Have you tried:

      Code:
      <mvt:if expr="g.Total_Reviews">
      <mvt:if expr="g.Total_Reviews EQ '1'">
               <small>(&mvt:global:Total_Reviews; review)</small>
      <mvt:else>
               <small>(&mvt:global:Total_Reviews; reviews)</small>
      </mvt:if>
      </mvt:if>
      Last edited by Leanne; 08-21-09, 08:03 AM.

      Comment


        #4
        Re: &quot;Ultimate Product Reviews&quot; coding question

        Leanne,

        That worked perfect. Thank you!

        Eric

        Comment

        Working...
        X