Announcement

Collapse
No announcement yet.

Display sub-sub-categories

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

    #31
    I did get this working and I meant to post what I did

    Code:
    <!-- placed outside product loop -->
    <mvt:assign name="l.settings:img:width" value="160"/>
    <mvt:assign name="l.settings:img:height" value="160"/>
    
    <mvt:foreach iterator="product" array="myProducts">
    <mvt:assign name="l.uri:store_id" value="g.Store:id" />
    <mvt:assign name="l.uri:screen" value="''" />
    <mvt:assign name="l.uri:page_id" value="0" />
    <mvt:assign name="l.uri:cat_id" value="0" />
    <mvt:assign name="l.uri:product_id" value="l.settings:product:id" />
    <mvt:do file="g.Module_Feature_URI_DB" name="l.have_uri" value="URI_Load_Item_Canonical( l.uri, l.settings:canonical_uri )" />
    
    <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">
    
    <!-- placed within the product loop -->
    <mvt:do file="g.Module_Library_DB" name="l.settings:sub_category:product:image_count" value="ProductImageDataList_Load_Product(l.setting s:product:id, l.settings:product:images)" />
    <mvt:foreach iterator="image" array="product:images">
    <mvt:if expr="l.settings:image:imagetype:code EQ 'main'">
    <mvt:assign name="l.settings:product:main_image" value="l.settings:image" />
    <mvt:foreachstop/>
    </mvt:if>
    </mvt:foreach>
    
    <mvt:do file="g.Module_Library_DB" name="l.result" value="GeneratedImage_FindOrInsert_Image_Dimension s( l.settings:product:main_image:image, l.settings:img:width, l.settings:img:height, l.settings:product:main_image:generated )" />
    <mvt:assign name="l.settings:image:mainthumb" value="l.settings:product:main_image:generated:ima ge" />
    <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 data-mm-linktype="product-list-link" href="&mvt:canonical_uri:uri;">
    
    <mvt:if expr="l.settings:image:mainthumb">
    <img src="&mvte:image:mainthumb;" alt="&mvte:product:name;" />
    <mvt:else>
    <img src="graphics/00000001/1/image-coming-soon_160x160.png" alt="&mvte:product:name;" />
    </mvt:if>
    </a>
    <mvt:else>
    <mvt:if expr="l.settings:image:mainthumb">
    <img src="&mvte:image:mainthumb;" alt="&mvte:product:name;" />
    <mvt:else>
    <img src="graphics/00000001/1/image-coming-soon_160x160.png" alt="&mvte:product:name;" />
    </mvt:if>
    </mvt:if>
    </li>

    I'll take a peek at what you did, it looks a bit "less involved". 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