Products Module Summary Template + hierarchy image

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
magallo
Dev Team Member
Dev Team Member
Posts: 123
Joined: Thu Mar 24, 2011 12:37 am

Products Module Summary Template + hierarchy image

Post 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
allisonfoley
Forum Members
Forum Members
Posts: 24
Joined: Wed Jun 18, 2008 1:25 am

Re: Products Module Summary Template + hierarchy image

Post by allisonfoley »

I have the same question, but I'm trying to get the corresponding hierarchy image within the Products detail template.
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am

Re: Products Module Summary Template + hierarchy image

Post 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.
allisonfoley
Forum Members
Forum Members
Posts: 24
Joined: Wed Jun 18, 2008 1:25 am

Re: Products Module Summary Template + hierarchy image

Post 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.
allisonfoley
Forum Members
Forum Members
Posts: 24
Joined: Wed Jun 18, 2008 1:25 am

Re: Products Module Summary Template + hierarchy image

Post 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}">
Post Reply

Return to “Modules/Add-Ons”