I'm using this snippet to find the category a product is assigned to.
I was even able to limit it to display a specific category code
BUT I hit a gotcha - the site uses a slugified link for the Canonical URI. Is there a way to incorporate the ability to load the Category Canonical URI
Thanks!
Leslie
Code:
<mvt:do name="l.result" file="g.Module_Library_DB" value="CategoryList_Load_Offset_Product_Assigned(l .settings:product:id,0,'','',0,l.null, g.assigned_categories )" /> <mvt:foreach iterator="category" array="global:assigned_categories"> &mvt:category:active;<br> &mvt:category:code;<br> &mvt:category:id;<br> &mvt:category:name;<br> </mvt:foreach>
Code:
<mvt:do name="l.result" file="g.Module_Library_DB" value="CategoryList_Load_Offset_Product_Assigned(l .settings:product:id,0,'','',0,l.null, g.assigned_categories )" /> <mvt:foreach iterator="category" array="global:assigned_categories"> <mvt:if expr="'Brand' CIN l.settings:category:code"> <a href="/&mvt:category:code;.html"> link </a> <br> </mvt:if> </mvt:foreach>
Code:
<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="1" /> <mvt:do file="g.Module_Feature_URI_DB" name="l.have_uri" value="URI_Load_Item_Canonical( l.uri, l.settings:canonical_uri )" /> <mvt:if expr="l.have_uri"> &mvt:canonical_uri:canonical; <br> &mvt:canonical_uri:cat_id;<br> &mvt:canonical_uri:page_id;<br> &mvt:canonical_uri:status;<br> &mvt:canonical_uri:store_id;<br> &mvt:canonical_uri:uri;<br> </mvt:if>
Leslie
Comment