Originally posted by Bruce - PhosphorMedia
View Post
Announcement
Collapse
No announcement yet.
This set 'mvt:if' conditionals does not seem to affect display
Collapse
X
-
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.
- 1 like
Leave a comment:
-
Originally posted by PCINET - Andreas View PostTry 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'">
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:
-
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'">
- 1 like
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>
Tags: None
Leave a comment: