Jump to content

List of available categories in list manufacturer


Recommended Posts

It helps. List of available categories in list manufacturers. I have changed the code of manufacturer.tpl to:

 

Link to the site:http://www.tamscar-audio.es/shop/3_alphasonik

 

{include file="$tpl_dir./breadcrumb.tpl"}

<div id="center_column_inner" class="clearfix">

{include file="$tpl_dir./errors.tpl"}

 

{if !isset($errors) OR !sizeof($errors)}

<h2 class="border">{l s='List of products by manufacturer:'} 

{if isset($categories) && count($categories) == 1}

<a href="{$link->getmanufacturerLink($manufacturer->id_manufacturer, $manufacturer->link_rewrite)|escape:'htmlall':'UTF-8'}" class="colored">{$manufacturer->name|escape:'htmlall':'UTF-8'}</a> 

{else}

<span class="colored">{$manufacturer->name|escape:'htmlall':'UTF-8'}</span>

{/if}

</h2>

{if isset($categories)}

<!-- Categories -->

<div id="subcat">

{if count($categories) >1}

<h3>{l s='Categories'} {l s='availables'}</h3>

<ul>

{foreach from=$categories item=category}

<li>

<a href="{$link->getmanufacturerLink($manufacturer->id_manufacturer, $manufacturer->link_rewrite)|escape:'htmlall':'UTF-8'}?id_category={$category.id_category}"><img src="{$link->getCatImageLink($category.link_rewrite, $category.id_image, 'medium')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /></a>

<div><a href="{$link->getmanufacturerLink($manufacturer->id_manufacturer, $manufacturer->link_rewrite)|escape:'htmlall':'UTF-8'}?id_category={$category.id_category}">{$category.name|escape:'htmlall':'UTF-8'}</a></div>

</li>

{/foreach}

</ul>

{else if count($categories) ==1}

<h3>{l s='Categorie'}: {foreach from=$categories item=category}<span class="colored">{$category.name|escape:'htmlall':'UTF-8'}</span>{/foreach}</h3>

{/if}

 

<div class="clear"></div>

</div>

<!-- /Categories -->

{/if}

 

{if $products}

<div class="top_actions clearfix">

{include file="$tpl_dir./product-sort.tpl"}

</div>

{include file="$tpl_dir./product-list.tpl" products=$products}

{include file="$tpl_dir./pagination.tpl"}

{else}

<p>{l s='No products for this manufacturer.'}</p>

{/if}

{/if}

</div>

 

 

But all the categories go out and not only the available ones.

 

Can Alquien help me?

 

Thank you

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