Announcement

Collapse
No announcement yet.

Conditional to Only Show Inventory By Specific Customer Custom Field Check Box

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

    Conditional to Only Show Inventory By Specific Customer Custom Field Check Box

    I am looking for a way to show inventory to only customers that have a CUSTOM CUSTOMER field checkbox selected to show inventory on the PROD Page.

    Currently this code will not work because it is a CUSTOMER CUSTOM Field Check Box. What would be the correct conditional to call if the Custom Field Customer "Show Inventory" Customer Check Box is selected on the customer account on PROD?

    Code:
    <mvt:if expr="NOT ISNULL l.settings:product:customfield_values:customfields :showinventory">
    <mvt:if expr="l.settings:product:inv_active OR l.settings:attributemachine:product:inv_active">
    <link itemprop="availability" href="http://schema.org/&mvt:product:inv_short;">
    </mvt:if>
    <div id="inventory-message" class="x-product-layout-purchase__inventory-message"><mvt:if expr="l.settings:product:inv_active OR l.settings:attributemachine:product:inv_active">&m vt:product:inv_long;</mvt:if></div>
    </mvt:if>

    Thanks!
    Jon

    Viscott Limited
    www.viscott.com

    #2
    Jon, what if you wrap in Price Group or Availability Group? Something that requires a login first then maybe you could do something that uses this?

    Code:
    <mvt:if expr="g.basket:cust_id GT 0 AND g.customer:pgrpcount GT 0">
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    Comment


      #3
      <mvt:item name="customfields" param="Read_Customer_ID( l.settings:basket:cust_id, 'enter_custom_field_code_here', l.settings:custom:custom_field)" />
      <mvt:if expr="l.settings:custom:custom_field">
      do 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