Magento Select Categories inseide a categorie -


i have severall products belong multiple categories. need kind of layered navigation have kind of category tree:

  • cat a
  • *cat a1
  • *cat a2
  • cat b
  • *cat b1
  • *cat b2

cat brands, , cat b type of product.

in catalog when go cat b1, want add filter shows brands of products. filter cat a1 , cat a2, , if filter cat a1 show products cat b1 belong cat a1.

what mean, intersection of both categories, , allways display in layered navigation. every time enter category, must display categories products inside of belongs to.

design/frontend///catalog/layer/view.phtml

    <?php if($this->canshowblock()): ?> <div class="block block-layered-nav">     <div class="block-title">         <strong><span><?php echo $this->__('shop by') ?></span></strong>     </div>     <div class="block-content">         <?php echo $this->getstatehtml() ?>         <?php if($this->canshowoptions()): ?>             <dl id="narrow-by-list">                  <?php $_filters = $this->getfilters() ?>                 <?php $counter=1; foreach ($_filters $_filter): ?>                  <?php if($_filter->getitemscount()): ?>                 <span>                     <dt id="filter_heading"><?php echo $this->__($_filter->getname()) ?><span class="togglebtn highlight" id="togglebtn<?php echo $counter; ?>"></span></dt>                     <dd id="filter_content<?php echo $counter; ?>" style="display:block;"><?php echo $_filter->gethtml() ?></dd>                       <script type="text/javascript">                         jquery('#togglebtn<?php echo $counter; ?>').click(function() {                           jquery('#filter_content<?php echo $counter; ?>').slidetoggle('slow');                            jquery(this).toggleclass("highlight");                         });                     </script>                     </span>                 <?php endif; $counter++; ?>                 <?php endforeach; ?>              </dl>             <script type="text/javascript">decoratedatalist('narrow-by-list')</script>         <?php endif; ?>     </div> </div> <?php endif; ?> 

theme catalog.xml

<catalog_category_layered translate="label">         <label>catalog category (anchor)</label>         <reference name="root">             <action method="settemplate"><template>page/2columns-left.phtml</template></action>         </reference>         <reference name="left">             <block type="catalog/layer_view" name="catalog.leftnav" after="catalog.magicat" template="catalog/layer/view.phtml"/>         </reference>         <reference name="content">             <block type="catalog/category_view" name="category.products" template="catalog/category/view.phtml">                 <block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">                     <!-- <action method="addreviewsummarytemplate"><type>default</type><template>review/helper/su.phtml</template></action> -->                     <block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">                         <block type="page/html_pager" name="product_list_toolbar_pager"/>                         <!-- following code shows how set own pager increments -->                         <!--                              <action method="setdefaultlistperpage"><limit>10</limit></action>                             <action method="setdefaultgridperpage"><limit>8</limit></action>                             <action method="addpagerlimit"><mode>list</mode><limit>10</limit></action>                             <action method="addpagerlimit"><mode>list</mode><limit>20</limit></action>                             <action method="addpagerlimit"><mode>list</mode><limit>30</limit></action>                             <action method="addpagerlimit" translate="label"><mode>list</mode><limit>all</limit><label>all</label></action>                             <action method="addpagerlimit"><mode>grid</mode><limit>8</limit></action>                             <action method="addpagerlimit"><mode>grid</mode><limit>16</limit></action>                             <action method="addpagerlimit"><mode>grid</mode><limit>24</limit></action>                             <action method="addpagerlimit" translate="label"><mode>grid</mode><limit>all</limit><label>all</label></action>                         -->                     </block>                     <!--action method="addcolumncountlayoutdepend"><layout>empty</layout><count>6</count></action>                     <action method="addcolumncountlayoutdepend"><layout>one_column</layout><count>5</count></action>                     <action method="addcolumncountlayoutdepend"><layout>two_columns_left</layout><count>4</count></action>                     <action method="addcolumncountlayoutdepend"><layout>two_columns_right</layout><count>4</count></action>                     <action method="addcolumncountlayoutdepend"><layout>three_columns</layout><count>3</count></action-->                     <action method="setcolumncount"><count>3</count></action>                     <action method="settoolbarblockname"><name>product_list_toolbar</name></action>                 </block>             </block>         </reference>     </catalog_category_layered> 

any appreciatted.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -