Announcement

Collapse
No announcement yet.

This set 'mvt:if' conditionals does not seem to affect display

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

  • cpp-dev
    replied
    Originally posted by Bruce - PhosphorMedia View Post
    CIN and IN look for specific matching strings within either other strings or variables.

    IN is the same as CIN but only matches the exact case of the string.

    ...

    NOTE: Use IN if you know the format of the variable value as its much faster.
    Thank you, Bruce! Very clear and concise!

    Leave a comment:


  • Bruce - PhosphorMedia
    replied
    CIN and IN look for specific matching strings within either other strings or variables.

    IN is the same as CIN but only matches the exact case of the string.

    For example:

    If the variable g.testThis is "hello"

    'Hello' IN g.testThis is false
    'hello' IN g.testThis is true
    'Hello' CIN g.testThis is true

    NOTE: Use IN if you know the format of the variable value as its much faster.

    Leave a comment:


  • cpp-dev
    replied
    Originally posted by PCINET - Andreas View Post
    Try this syntax instead:
    <mvt:if expr="l.settings:product:code CIN 'item-9-22-1tab,item-22-44-1tab,item-44-88-1tab,item-88-123-1tab'">
    That seems to have done the trick! Wicked!!

    I've not seen the CIN operator before. What does it mean? I'm not seeing it in the docs.
    Last edited by cpp-dev; 08-23-18, 08:35 AM.

    Leave a comment:


  • PCINET - Andreas
    replied
    Try this syntax instead:
    <mvt:if expr="l.settings:product:code CIN 'item-9-22-1tab,item-22-44-1tab,item-44-88-1tab,item-88-123-1tab'">

    Leave a comment:


  • This set 'mvt:if' conditionals does not seem to affect display

    What: A ReadyTheme content section holding a set of information that relates to specific groups of products, but not all the products where the content section will be displayed.

    Desired outcome: Group the 'sub sections' into mvt:if statements that will only show the relevant information. I have achieved a similar effect before, but it only evaluated a single value not a group of values.

    The code:
    Code:
    <mvt:comment>item dog special</mvt:comment>
    <div class="banner-alert">
      <div class="item-special-head">
          Save on item
      </div>
      <mvt:if expr="l.settings:product:code EQ 'item-9-22-1tab' OR 'item-22-44-1tab' OR 'item-44-88-1tab' OR 'item-88-123-1tab'">
        <div class="banner-text item-special">
          <p>Save $_on Singles</p>
          <p>Use coupon code: <em>code</em></p>
        </div>
      </mvt:if>
      <mvt:if expr="l.settings:product:code EQ 'item-4-9-3tabs' OR 'item-9-22-3tabs' OR 'item-22-44-3tabs' OR 'item-44-88-3tabs' OR 'item-88-123-3tabs'">
        <div class="banner-text item-special" style="border-right: 1px solcode #4178c8; border-left: 1px solcode #4178c8;">
          <p>Save $_on 3 Pack</p>
          <p>Use coupon code: <em>code</em></p>
        </div>
      </mvt:if>
      <mvt:if expr="l.settings:product:code EQ 'item-4-9-6tabs' OR 'item-9-22-6tabs' OR 'item-22-44-6tabs' OR 'item-44-88-6tabs' OR 'item-88-123-6tabs'">
        <div class="banner-text item-special">
          <p>Save $_on 6 Pack</p>
          <p>Use coupon code: <em>Code</em></p>
        </div>
      </mvt:if>
    </div>
    This seems like it should work, but when ever I load one of the pages with this Content Section displayed, it shows all of the sub sections.
Working...
X