Okay
  Public Ticket #2000802
Show subcategories
Closed

Comments

  • Mirco started the conversation

    Hi, I would like to see the sub-categories (as in the attached image).

    Can you make this change or tell me which file I need to work on?

    Thank you!

  •  315
    Andrea replied

    Hi Mirco,

    If you want to edit the "Subcategories" block, go to the directory:
    \themes\default-bootstrap\category.tpl
    and edit file category.tpl


    Best Regards,

    Andrea - FieldThemes Support Team

  • Mirco replied

    Hi bro,

    thank you for your answer.

    I looked but there is no "default-bootstrap" folder in my root directory

  • Mirco replied

    Hi bro,

    I believe I have solved it.

    I modified the file "category.tpl" in the folder "/themes/jugo3/templates/catalog/listing/".


    Original code:

    {extends file='catalog/listing/product-list.tpl'}
    {block name='banner_categories'}
        
    {/block}
    {block name='product_list_header'}
        {if $category.description}
            <h1 class="category_h1">{$category.name}</h1>
            <div id="category-description" class="text-muted">{$category.description nofilter}</div>
        {/if}
    {/block}


    New code:

    {extends file='catalog/listing/product-list.tpl'}
    {block name='banner_categories'}
        
    {/block}
    {block name='product_list_header'}
        {if $category.description}
            <h1 class="category_h1">{$category.name}</h1>
            <div id="category-description" class="text-muted">{$category.description nofilter}</div>
        {/if}

    {if isset($subcategories)}
    <!– Subcategories ->
    <div id="subcategories">
    <p class="subcategory-heading">{l s='Subcategories'}</p>
    <ul class="clearfix">
    {foreach from=$subcategories item=subcategory}
    <li>
    <div class="subcategory-image">
    <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img">
    {if $subcategory.id_image}
    <img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'category_default')|escape:'html':'UTF-8'}" alt="{$subcategory.name|escape:'html':'UTF-8'}"/>
    {else}
    <img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-category_default.jpg" alt="{$subcategory.name|escape:'html':'UTF-8'}"/>
    {/if}
    </a>
    </div>
    <h5><a class="subcategory-name" href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}">{$subcategory.name|truncate:25:'…'|escape:'html':'UTF-8'}</a></h5>
    {if $subcategory.description}
    <div class="cat_desc">{$subcategory.description}</div>
    {/if}
    </li>
    {/foreach}
    </ul>
    </div>
    {/if}

    {/block}

    Now I just have to customize the css file;)


  •  315
    Andrea replied

    Hi Mirco,

    yes great
    Wish you a happy new day


    Best Regards,

    Andrea - FieldThemes Support Team