Announcement

Collapse
No announcement yet.

Display Custom Category Fields in a sub sub cat

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

    Display Custom Category Fields in a sub sub cat

    I can see what the token could be
    Code:
    &mvt:cattree_categories:customfield_values:customfields:addimg1;
    in the Tokens List. But of course, trying to use that token isn't giving me any results so I tried something else. Since this is part of a sub-sub cat display I'm including at the code up to the closing div for the display. What is in bold red is what I need to work:


    Code:
    <mvt:assign name="l.settings:subcat:id" value=" " />
    <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 )" />
    <mvt:assign name="l.subcat_count" value="miva_array_elements( l.settings:sub_categories )" />
    <mvt:if expr="l.subcat_count GT 0">
    <mvt:foreach iterator="subcat" array="sub_categories">
    <section>
    <p></p>
    <ul class="c-form-list o-layout o-layout--wide">
    <li class="c-form-list__item o-layout__item u-width-10--m">
    <a name="&mvte:subcat:code;"></a>
    <h3><strong>&mvte:subcat:name;</strong></h3></li>
    <li class="c-form-list__item o-layout__item u-width-2--m">
    <h3> <a href="&mvt:category:link;#top"><span class="u-font-small u-icon-chevron-up"></span>
    <strong class="u-color-red">Back to top</strong></a></h3></li>
    </ul>
    </section>
    <mvt:comment>tweaked with Ted's help</mvt:comment>
    
    <mvt:assign name="l.settings:myProducts" value="0" />
    <mvt:do name="l.doit" file="g.Module_Library_DB" value="Runtime_ProductList_Load_Offset_Category( l.settings:subcat:id, g.Offset, l.settings:null, g.NextOffset, l.settings:myProducts )" />
    <section class="o-layout o-layout--row--l o-layout--wide">
    <div class="o-layout__item u-width-3--l">
    <mvt:do file="g.Module_Root $ '/modules/component/cmp-cssui-cattitle.mvc'" name="l.success" value="CSSUI_CatTitle_Load(l.settings:subcat:id, l.settings:subcat:title_image)" />
    <img src="&mvt:subcat:title_image:image;" alt="&mvte:subcat:name;">
    <mvt:item name="customfields" param="Read_Category_Code( l.settings:subcat:code, 'altimg1', l.settings:altimg1 )" />
    &mvte:altimg1;
    </div>
    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
Working...
X