Announcement
Collapse
No announcement yet.
Hiding Products From Feed
Collapse
X
-
What through me was in the back end, it shows as No or Yes, so I was thinking that may be the actual value, because I am able to put anything in that field I want.
Also, yes I tried the version that also included customfield_values and that didn't work either, hence me trying the shorter version.
I'll try the suggestions here and will report back.
Leave a comment:
-
I second Bruce's point, the checkbox is a boolean, so simply testing for the existence will return the result you want.
Two additional points
- I strongly recommend using less than or equal to (LE) on your inventory test, just a CYA in the event that an item is oversold and ends up with a negative inventory level.
- Is the custom field selected to be included in the feed? I'm guilty of overlooking this quite often.
HTML Code:<mvt:if expr="NOT(l.settings:record:inventory LE '0') AND l.settings:record:customfield:wwefeed">Show it</mvt:if>
Last edited by kocourek; 10-11-19, 06:19 AM.
Leave a comment:
-
I'd take a closer look at the other half of the expression, l.settings:record:inventory. If that's coming up zero every time, it will prevent the records from being shown.
Also, are you sure that l.settings:record:customfield:wwefeed is the correct variable name? IIRC, Miva custom fields used to require a longer expression, something like l.settings:record:customfield_values:customfields: wwefeed.
HTH --
Leave a comment:
-
its a boolen field so it should return on 1 or nothing...so, i just use
<mvt:if expr="l.settings:pm:thisCheckbox">
or
<mvt:if expr="NOT(l.settings:pm:thisCheckbox)">
cause its less typing
Leave a comment:
-
Hiding Products From Feed
I'm trying to write logic for a checkbox custom field. Simple, IF CHECKED, show this product in the feed. I'm banging my head against a wall not able to get it to work....
HTML Code:<mvt:if expr="l.settings:record:inventory NE '0' AND l.settings:record:customfield:wwefeed EQ 'Yes'">Show it</mvt:if>
Tags: None
Leave a comment: