Announcement

Collapse
No announcement yet.

Display Custom Category Field in a sub_categories array that's not on a Category Page

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

    Display Custom Category Field in a sub_categories array that's not on a Category Page

    I am really trying to channel my inner Bruce and get this to work. I have tried multiple variations of code snippets. In order to see where this is needed, it's probably best to post the entire "snippet". This code is part of the SFNT. Everything works except the attempt to display Category Custom Field catadd1 (yes the custom field is assign in the cattree template).

    Code:
    <section class="t-expanded-block">
    <div class="t-storefront-featured-products t-defer-object" data-defer>
    <mvt:assign name="g.category_code" value="'RTA-kitchen-cabinets'" />
    <mvt:do name="l.result" file="g.Module_Library_DB" value="Category_Load_Code( g.Category_Code, l.settings:current_category )" />
    
    <mvt:do name="l.result" file="g.Module_Library_DB" value="CategoryList_Load_Parent( l.settings:current_category:id, l.settings:sub_categories )" />
    <div class="x-product-list x-product-list--slicked t-storefront-featured-product-list" data-hook="featured-products">
    <mvt:foreach iterator="subcat" array="sub_categories">
    <mvt:do file="g.Module_Root $ '/modules/component/cmp-cssui-cattree.mvc'" name="l.success" value="CSSUI_CatTree_Load(l.settings:subcat:id, l.settings:subcat:tree_image)" />
    <div class="u-text-center x-product-list__item">
    <a class="u-block u-color-black x-product-list__link" href="/&mvt:subcat:code;.html">
    <figure class="x-product-list__figure">
    <picture class="x-product-list__picture">
    <img class="x-product-list__image" data-lazy="&mvt:subcat:tree_image:image;" src="" alt="&mvt:subcat:name; Ready to Assemble Kitchen Cabinets">
    </picture>
    <figcaption class="x-product-list__figure-caption">
    <span class="x-product-list__name">&mvt:subcat:name;</span>
    <mvt:item name="customfields" param="Read_Category_Code( 'category_code', 'catadd1', l.settings:catadd1 )" />
    <mvt:if expr="l.settings:catadd1">
    &mvte:catadd1;
    </mvt:if>
    </figcaption>
    </figure>
    </a>
    </div>
    </mvt:foreach>
    </div>
    </div>
    </section>
    What am I missing?

    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

    #2
    LOL...sometimes I need to channel my inner bruce...but if that's the actual code, try:


    <mvt:item name="customfields" param="Read_Category_Code( l.settings:subcat:code, 'catadd1', l.settings:catadd1 )" />
    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


      #3
      Thanks, Bruce - PhosphorMedia - I knew I needed that subcat somewhere. Thanks.
      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

      Working...
      X