Jump to content

Ayuda código listado fabricantes.


Recommended Posts

Hola a todos:

 

A ver si alguien me puede echar una mano. Necesito sacar las categorías disponibles en el listado del producto de cada fabricante.

 

Cambiando el código del manufacturer.tpl del theme, he conseguido que salgan todas las categorías, pero no me discrimina las "disponibles de ese fabricante"

 

Os dejo el enlace para ver el sitio y el código

 

 

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>

 

Gracias de antemano.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...