Announcement

Collapse
No announcement yet.

a little help with conditional to exclude multiple companies

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

    a little help with conditional to exclude multiple companies

    How would I change the code below if I wanted to exclude more than one company from the condition (i.e. Company A, Company B, Company C)?

    <mvt:if expr="l.settings:product:customfield_values:custom fields:MFR NE 'Company A'">
    Display This
    </mvt:if>
    Bronson Design Studio, LLC
    Website: bronsondesign.com
    Facebook: facebook.com/bronsondesign

    #2
    I have done this by adding these accounts to a price group or availability group and then using Toolkit functions to see if customers are in a price or availability group in my page templates. (I wouldn't want to code specific customer names into my page templates.) Here's what I have in place on one page where I want to offer a free shipping coupon to retail customers who are not members of a price group but not to wholesale customers who are members of one or more price group(s).

    Code:
    <mvt:item name="toolkit" param="pgroup|pcount" />
    <mvt:if expr="g.pcount GT 0">
    <br />
    <mvt:else>
    <br />
    <h2><strong>For a limited time:</strong> free domestic shipping on orders over $65!</h2>
    <br />
    <p>To receive free US shipping on retail orders over $65, use coupon code <strong>FreeShip</strong> at checkout.</p>
    </mvt:if>
    Todd Gibson
    Oliver + S | Sewing Patterns for Kids and the Whole Family

    Comment


      #3
      Originally posted by papi34 View Post
      How would I change the code below if I wanted to exclude more than one company from the condition (i.e. Company A, Company B, Company C)?

      <mvt:if expr="l.settings:product:customfield_values:custom fields:MFR NE 'Company A'">
      Display This
      </mvt:if>


      In general, the easiest way to manage a list like that is to use 'in string'.

      <mvt:if expr="'|'$l.settings:product:customfield_values:cu stomfields:MFR$'|' IN '|Company A|Company B|etc|'">
      Display This
      </mvt:if>
      Bruce Golub
      Phosphor Media - "Your Success is our Business"

      Improve Your Customer Service | Get MORE Customers | Edit CSS/Javascript/HTML Easily | Make Your Site Faster | Get Indexed by Google | Free Modules | Follow Us on Facebook
      phosphormedia.com

      Comment

      Working...
      X