I am trying to create a Category Tree with a Random Product Image from Products within each category.
Problem: The Product Image is not displaying for each Category.
Can someone take a look and provide some feedback?
I am guessing that this line of code is wrong....
Because, when I plug in an actual cat code instead of using "l.settings:cattree_category:code", the image appears for that specific category. But when running through the category array and using "l.settings:cattree_category:code" no images display.
Many thanks!
Corina
Problem: The Product Image is not displaying for each Category.
Can someone take a look and provide some feedback?
HTML Code:
<mvt:foreach array="cattree_categories" iterator="cattree_category"> <a href="&mvte:cattree_category:link;"> <mvt:item name="toolkit" param="sassign|cat_code|l.settings:cattree_category:code" /> <mvt:item name="toolkit" param="randomcat|pcount|g.cat_code|1" /> <mvt:if expr="pcount GT 0"> <mvt:foreach iterator="sub_product" array="sub_products"> <mvt:item name="toolkit" param="customimage|ipath|l.all_settings:sub_product:id||150|150|" /> <mvt:if expr="g.ipath AND (NOT ISNULL l.settings:toolkitadditionalimages[1]:generated:image)"> <img src="&mvte:toolkitadditionalimages[1]:generated:image;" border="0"> <br /> <mvt:else> <mvt:if expr="(NOT ISNULL l.settings:sub_product:thumbnail)"> <img src="&mvte:sub_product:thumbnail;" border="0"> <br /> </mvt:if> </mvt:if> </mvt:foreach> </mvt:if> &mvte:cattree_category:name; </a> </mvt:foreach>
HTML Code:
[<mvt:item name="toolkit" param="sassign|cat_code|l.settings:cattree_category:code" />
Many thanks!
Corina
Comment