I'm trying and failing to understand how to access and call some of the more advanced features of Products templating. Specifically, I'm trying to change the template design of the LIST VIEW depending how you get there (hierarchy view or category view).
My best attempt so far is to try programming "IF this set of products CONTAINS one hierarchy, print one thing (say, a hierarchy image). If it has more than one hierarchy, print something else (a category image, or no image at all)." This will activate if you choose a category that contains products with multiple hierarchies.
I'm not sure how to program Smarty to "count all of the unique values of hierarchy in this set." I tried the code below, but this only counts the total number of products... Not very handy:
Code: Select all
{assign 'get_hierarchy_info' value=$Products->GetHierarchyInfo($items[0]->hierarchy_id)}
{if $get_hierarchy_info.count gt 1}
THIS DISPLAYS IF PAGE HAS MULTIPLE HIERARCHIES
{else}
THIS DISPLAYS IF PAGE HAS ONLY ONE HIERARCHY
{/if}

