Jump to content

Get subcategories


Ramio

Recommended Posts

Hi...

I'm trying to customize default-bootstrap and after i've totally hidden left column, i've to show subcategories image with link in place of category image.

I'm editing category.tpl in themes/default-bootstrap after <!-- Category image -->

 

How can I get subcategories information? I need subcategory id and subcategory name.

Could somebody help me?

thanks

Edited by Ramio (see edit history)
Link to comment
Share on other sites

I made this lines of code but nothing
 

{foreach from=$subscategories item=subcategory}
<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}"><img src="{$base_dir}icone/{$subcategory.id_category}.jpg" /></a>
{/foreach}
Link to comment
Share on other sites

ok I solved my problem fixing my lines of codes like this
 

{foreach from=$subcategories item=subcategory}
	<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}">
		<img class="replace-2x" src="{$base_dir}icone/{$subcategory.id_category|escape:'html':'UTF-8'}.jpg" />
	</a>
{/foreach}

I needed this solution because i'll do a multilanguage shop and an orizzontal menù with subcategories icons. Icons have got a watermark on the botton with the name of subcategory so I can't use default subcategory image.

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...