Jump to content

Sub - Categories


Recommended Posts

Hi

Just wondering if anyone could help me out.

Is there a way so that when you click on a top level category on the menu, that the sub categories of this menu are not displayed in the centre of the page.

When someone clicks on a top level category in my store I want just a list of select products to appear in the centre of the page. The subcategories will appear on the menu anyway, I don't see the need to have them listed twice.

Hope ye understand what I mean!

Many thanks

Link to comment
Share on other sites

Modify category.tpl in your theme's directory and {* comment out *} the following code starting at line 23:

{if isset($subcategories)}
<!-- Subcategories -->

{l s='Subcategories'}

   {foreach from=$subcategories item=subcategory}

getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}">
               {if $subcategory.id_image}
getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" />
               {else}

               {/if}



getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}

   {/foreach}




{/if}

Link to comment
Share on other sites

Thank you very much Rocky, that's exactly what I was looking for.

Is it possible when you click on a top level category that it opens up a specific sub category.

eg I have
Laptops
-Dell
-Apple
-HP

Is it possible when someone clicks on laptops it will expand the menu and open say the dell page. I'm using the "Sliding Categories block v1.0"

Thanks again Rocky

Link to comment
Share on other sites

  • 2 weeks later...

Go to Catalog > Add new subcategory, create a subsubcategory, then set the parent category to the subcategory. You can then create another subsubcategory and set its parent category to the same subcategory and it should display how you want.

Link to comment
Share on other sites

i have exacly what u have

look:

{foreach from=$subcategories item=subcategory}

getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}">
                   {if $subcategory.id_image}
getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" />
                   {else}

                   {/if}

[b]  HERE WHANT HAVE SUBCATEGORY OF IT CATEGORY!![/b]


       {/foreach} 



need i want show sub category of category.
i have photo maindly category and next need list of subcategory of it.

u know what i need? :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...