Jump to content

Afisare subcategorii ca lista


Recommended Posts

Salutare tuturor, sunt incepator in prestashop iar cunostintele mele de programare sunt limitate.

Lucrez la un magazin de piese auto iar subcategorii ca filtrare (exemplu an, model , motor) iar numarul lor este foarte mare pentru fiecare masina in parte.

As avea nevoie de o solutie pentru afisarea subcategoriilor in main sub forma de lista si nu una sub alta cu poza.

Exista vre-un modul free pentru asa ceva?

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

in tema ta cauta fisierul category.tpl si schimba codul de mai jos

  {foreach from=$subcategories item=subcategory}
   <li>
 <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}">
  {if $subcategory.id_image}
   <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
  {else}
   <img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
  {/if}
 </a><br />
 <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a>
   </li>
  {/foreach}

 

cu

 

 

  {foreach from=$subcategories item=subcategory}
   <li>
 <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a>
   </li>
  {/foreach}

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