Page 1 of 1
Products Module Summary Template + hierarchy image
Posted: Thu Aug 25, 2011 7:22 am
by magallo
Hey guys, with the Products module, i'm trying to display the hierarchy image in the summary template.
I basically wish to have the hierarchy image on top of the products.
Help is very much apriciated.
Thanks,
M
Re: Products Module Summary Template + hierarchy image
Posted: Tue Sep 20, 2011 1:10 am
by allisonfoley
I have the same question, but I'm trying to get the corresponding hierarchy image within the Products detail template.
Re: Products Module Summary Template + hierarchy image
Posted: Tue Sep 20, 2011 11:57 am
by applejack
You can make module Smarty calls within the templates i.e. {Products action=hierarchy etc etc} can be used in another Products template.
Re: Products Module Summary Template + hierarchy image
Posted: Tue Sep 20, 2011 5:31 pm
by allisonfoley
Thanks! I'm still having trouble displaying ONLY the image that pertains to the hierarchy of the current item. Here's what I've tried so far:
{Products action='hierarchy' hierarchy='name'}
{Products action='hierarchy' parent='$entry->hierarchy_id'}
Both return the full list of hierarchy items, rather than the one specific to the current product being viewed.
Re: Products Module Summary Template + hierarchy image
Posted: Tue Sep 20, 2011 5:47 pm
by uniqu3
Re: Products Module Summary Template + hierarchy image
Posted: Tue Sep 20, 2011 6:15 pm
by allisonfoley
FANTASTIC STUFF! Thanks for taking the time to figure things out and share your findings with others - Very helpful!
Here's the code I ended up using:
{assign var='get_hierarchy_info' value=$Products->GetHierarchyInfo($entry->hierarchy_id)}
<img src="{$hierarchy_image_location}/{$get_hierarchy_info.image}">