Announcement

Collapse
No announcement yet.

Hiding Products From Feed

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

  • Bruce - PhosphorMedia
    replied
    Token List should show what the actual variables available are.

    Leave a comment:


  • aarcmedia
    replied
    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:


  • kocourek
    replied
    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:


  • Kent Multer
    replied
    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:


  • Bruce - PhosphorMedia
    replied
    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:


  • aarcmedia
    started a topic Hiding Products From Feed

    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>
    Anyone tell me what moronic thing I'm doing wrong?
Working...
X