Comments Mirco started the conversationMay 6, 2019 at 6:04pmHi, 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! 315Andrea repliedMay 7, 2019 at 3:37amHi Mirco,If you want to edit the "Subcategories" block, go to the directory:\themes\default-bootstrap\category.tpland edit file category.tplBest Regards, Andrea - FieldThemes Support Team1 LikeMirco repliedMay 7, 2019 at 9:59amHi bro,thank you for your answer.I looked but there is no "default-bootstrap" folder in my root directoryMirco repliedMay 7, 2019 at 12:17pmHi 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;) 315Andrea repliedMay 7, 2019 at 2:27pmHi Mirco,yes greatWish you a happy new dayBest Regards, Andrea - FieldThemes Support Team Sign in to reply ...
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!
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
Hi bro,
thank you for your answer.
I looked but there is no "default-bootstrap" folder in my root directory
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;)
Hi Mirco,
yes great
Wish you a happy new day
Best Regards,
Andrea - FieldThemes Support Team