Originally posted by aarcmedia
View Post
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="Runtime_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"> <h2 style="font-size:1.4rem; font-weight:bold;"><a name="&mvt:subcat:code;"></a>&mvte:subcat:name;</h2> <mvt:assign name="l.settings:sub_categories2" value=" " /> <mvt:do name="l.result" file="g.Module_Library_DB" value="Runtime_CategoryList_Load_Parent( l.settings:subcat:id, l.settings:sub_categories2 )" /> <mvt:assign name="l.subcat2_count" value="miva_array_elements( l.settings:sub_categories2 )" /> <mvt:if expr="l.subcat2_count GT 0"> <mvt:foreach iterator="subcat2" array="sub_categories2"> <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:subcat2:code;"></a> <h3><strong>&mvte:subcat2:name;</strong></h3></li> <li class="c-form-list__item o-layout__item u-width-2--m"> <h3> <a href="/&mvt:category:code;.html#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 code</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:subcat2: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:subcat2:id, l.settings:subcat2:title_image)" /> <img src="&mvt:subcat2:title_image:image;" alt="&mvte:subcat2:name;"> </div> <div class="o-layout__item u-width-9--l"> <mvt:foreach iterator="product" array="myProducts"> <section> <form class="o-layout__item u-width-12 inline-labeling ctgy-add-form" data-hook="purchase" action="&mvte:urls:BASK:auto;" method="post" name="add"> <input type="hidden" name="Action" value="ADPR" /> <input type="hidden" name="Product_Code" value="&mvte:product:code;" /> <ul class="c-form-list o-layout o-layout--wide"> <li class="c-form-list__item o-layout__item u-width-6--m"><span>&mvt:product:name;</span> <mvt:if expr="NOT ISNULL l.settings:product:descrip"> <br>&mvt:product:descrip; </mvt:if> <mvt:item name="customfields" param="Read_Product_ID(l.settings:product:id, 'notes', l.settings:product:notes)" /> <mvt:if expr="NOT ISNULL l.settings:product:notes"> <br><div class="custom-field" id="customfields-notes"><span class="bold">Notes:</span> &mvt:product:notes;</div> </mvt:if> </li> <li class="c-form-list__item o-layout__item u-width-2--m"> <span>$<mvt:eval expr="l.settings:product:price ROUND 2" /></span></li> <li class="c-form-list__item o-layout__item u-width-1--m"><span> <input class="form-control form-control-sm col-sm-4 text-center float-right cart-quantity ctgyQuantity" autocomplete="off" style="margin:0 auto" type="tel" min="0" name="Quantity" value="1"> </span></li> <li class="c-form-list__item o-layout__item u-width-3--m"> <input type="submit" value="Add to Cart" class="ctgyCart c-button c-button--full c-button--large c-control-group__button u-bg-primary u-color-yellow u-text-bold u-font-small u-text-uppercase"> </li> </ul> </form> <hr class="c-keyline"> </section> </mvt:foreach> </div> </section> </mvt:foreach> <mvt:assign name="l.settings:sub_categories2" value=" " /> </mvt:if> </mvt:foreach> </mvt:if>
Leave a comment: