Announcement

Collapse
No announcement yet.

A range conditional

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

  • lesliekirk
    replied
    Originally posted by RTHOMASDESIGN View Post
    More information on logic operators here: http://www.mivascript.com/topic/operators.html
    Thanks Ryan - a bit of brain mush going on (and I can't even blame it all on the Current Events).

    Leave a comment:


  • lesliekirk
    replied
    Originally posted by Scot - ScotsScripts.com View Post
    Code:
    <mvt:if expr="l.settings:product:inv_available GE 1 AND l.settings:product:inv_available LE 4">
    do something
    </mvt:if>
    or

    Code:
    <mvt:if expr="l.settings:product:inv_available GE 1 AND l.settings:product:inv_available LT 5">
    do something
    </mvt:if>
    Thanks Scot - LOL when I saw this the first thing I thought of was an old GE slogan "We bring good things to life"

    Leave a comment:


  • RTHOMASDESIGN
    replied
    More information on logic operators here: http://www.mivascript.com/topic/operators.html

    Leave a comment:


  • Scot - ScotsScripts.com
    replied
    Code:
    <mvt:if expr="l.settings:product:inv_available GE 1 AND l.settings:product:inv_available LE 4">
    do something
    </mvt:if>
    or

    Code:
    <mvt:if expr="l.settings:product:inv_available GE 1 AND l.settings:product:inv_available LT 5">
    do something
    </mvt:if>

    Leave a comment:


  • lesliekirk
    started a topic A range conditional

    A range conditional

    Having a <mvt:duh> moment </mvt:duh> - how do I check for a range? Less than 5 but not 0. (4 through 1) - it's to check for an inventory level

    Code:
    <mvt:if expr="l.settings:product:inv_available LT '5'">
    <div id="js-inventory-message" class="column whole np">
    &mvt:product:inv_short;
    </div>
    </mvt:if>
    This works great except that it shows the 0 (Out of stock) level too. I just want to show the "low" level.

    Thanks!
    Leslie

Working...
X