I figured it would be better to start a new thread instead of convoluting an old one. Everything works great except for the product image. I've tried a couple different things but nothing is displaying the image
I have tried more than the 3 things highlighted in the code. I'm thinking maybe it needs some sort of Read_Product like what the customfields have. Is that what I need?
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-2--m"> <mvt:if expr="NOT ISNULL l.settings:product:imagetypes:main"> <a data-mm-linktype="product-list-link" href="&mvte:product:link;"><img src="&mvte:product:imagetypes:main;" alt="&mvte:product:name;" /></a> <mvt:else> &mvt:category_listing:products:imagetypes:main; </mvt:if> <!-- <img src="&mvt:product:image;" alt="&mvte:product:name;" /> --> </li> <li class="c-form-list__item o-layout__item u-width-4--m"> <mvt:item name="customfields" param="Read_Product_ID(l.settings:product:id, 'index', l.settings:product:index)" /> <mvt:if expr="NOT ISNULL l.settings:product:index"> <a href="/&mvt:product:code;.html"><span>&mvt:product:nam e;</span></a> <mvt:else> <span>&mvt:product:name;</span> </mvt:if> <mvt:comment> <mvt:if expr="NOT ISNULL l.settings:product:descrip"> <br>&mvt:product:descrip; </mvt:if> </mvt:comment> <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>
I have tried more than the 3 things highlighted in the code. I'm thinking maybe it needs some sort of Read_Product like what the customfields have. Is that what I need?
Comment