Product Hierarchy Menu

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
inyerface
Forum Members
Forum Members
Posts: 191
Joined: Mon Nov 26, 2007 4:46 pm

Product Hierarchy Menu

Post by inyerface »

I want to create a product hierarchy menu. I want to expand the selection only when it's clicked on, for example:

Women's
Men's
Children

=============

Click on Women's

Women's
-- Dresses
-- Skirts
-- Handbags
-- Etc.
Men's
Children

Am I missing something? Any ideas?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Product Hierarchy Menu

Post by Dr.CSS »

Yes, you are missing enough information for us to help you...

Have you managed to make these items appear on the page opened as if clicked, are they 'a links' or ?, are they in an UL, etc. etc...?
inyerface
Forum Members
Forum Members
Posts: 191
Joined: Mon Nov 26, 2007 4:46 pm

Re: Product Hierarchy Menu

Post by inyerface »

Very true... I am using Products 2.8.7 on CMSMS Version 1.9.2 "Tevairoa".

http://www.naturalfoodpantry.ca/shop-online/

I'd love to have this working line the menu manager for CMSMS:

Grocery
Gluten Free
Sports Nutrition
Supplements
Women's Health
Men's Health
Kid's Health

... until clicked on...

Code: Select all


{* hierarchy report template *}
<div class="productmenu">

{if !isset($hdepth) && isset($hierarchy_item)}
<h3>Hierarchy Data for {$hierarchy_item.name} ({$hierarchy_item.id})</h3>
{/if}



{if !isset($hdepth)}{assign var='hdepth' value='0'}{/if}
{*
 // create a nested set of unordered lists 
 // if the active_hierarchy smarty variable exists
 // and matches the current hierarchy id
 // the active class will be given
 // to the ul.  You may want to modify your summary template
 // to set this variable
*}

<ul class="products_hierarchy_level{$hdepth}">
{foreach from=$hierdata key='key' item='item'}
{strip}
  <li {if isset($active_hierarchy) and $item.id == $active_hierarchy} class="active"{/if}>
  {if $item.count gt 0}
     <a href="{$item.url}">{$item.name} ({$item.count})</a>
  {else}
     {$item.name}
  {/if}
  
  {if isset($item.children) }
    {* there are children call this template again *}
    {include file=$smarty.template hierdata=$item.children hdepth=$hdepth+1}
  {/if}
  
  </li>
{/strip}
{/foreach}
</ul>

</div>

User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Product Hierarchy Menu

Post by Dr.CSS »

If you can give your top items/parents a class or add an h2/3 to them you could use the jquery click drop for these...

http://multiintech.com look at action of the H2s with the +/- signs...
inyerface
Forum Members
Forum Members
Posts: 191
Joined: Mon Nov 26, 2007 4:46 pm

Re: Product Hierarchy Menu

Post by inyerface »

Hey, so essentially, this is what i want to do (now that I understand the full requirement). This site uses CMSMS but it is not mine... I saw it in the forum. The function i exactly what I want:

http://philliplazarus.com.au/foodservic ... s/fortessa

Notice the hierarchy shows the image (if there was one added) but if you click on one then it shows the next (sub) hierarchy until you get to a product.

This is really bugging me
Post Reply

Return to “Modules/Add-Ons”