Products module - default hierarchy to show

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
pistols
New Member
New Member
Posts: 8
Joined: Tue Jun 17, 2008 8:26 am

Products module - default hierarchy to show

Post by pistols »

Hello There,

I have a problem with the Products module I cannot solve.

I have a single level hierarchy.

1. fruits
2. vegetables
3. sauce

I have a page called "My offer" that pages content is {Products}

Now If I click on my main menu on "My offer" I get a list out of all products regardless of the categories.

I need to show only the ones that are in fruits!

can you please help me out, how to achieve this?

thanks
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: Products module - default hierarchy to show

Post by paulbaker »

Look in the module help and you will see
(optional) hierarchy="" - Used in the default and hierarchy actions this parameter has two uses. When used in the default (summary) action, this parameter specifies that only items in that location of the hierarchy should be displayed. Wildcard character can be used so that you can specify parent/child relationships as well. i.e {Products hierarchy='trucks*'} will create a summary report of all trucks, including the children in the hierarchy. Similarly, {Products hierarchy='*trucks'} will display a summary report of all trucks, and all items beloging to any parent in the hierarchy. A comma separated list of expressions can be supplied. i.e: {Products action=hierarchy hierarchy='trucks,cars'}
So you need

Code: Select all

{Products hierarchy="fruits"}
pistols
New Member
New Member
Posts: 8
Joined: Tue Jun 17, 2008 8:26 am

Re: Products module - default hierarchy to show

Post by pistols »

Hello Paul,

thank you for your reply. I did fiddle with it before posting, but my problem was that it did not show the category set as default. In other words it didn't reflect that active hierarchy item in my hierarchy report template.

The $active_hierarchy is empty, but it should have the order number of fruits in the hierarchy,

so, if I use your solution and set a default hierarchy item to show. My hierarchy report template breaks because it doesnt now in which hierarchy item we are...

Greets
Nikolas
Post Reply

Return to “Modules/Add-Ons”