Jump to content

Main Categories & Sub Categories Images


roz
 Share

Recommended Posts

hi all. i got question with category images. i want to do something like this on my shop, 

  • Main Category page - with full width banner. a category banner in that sense. with sub category thumbnails below. 
  • Sub Category page - without the full width banner. just the product list. 

with the main category i got no issue. but when i go to sub category, i want the banner away, because now it's having a full width space with the thumbnail in it. 

 

see images below

 

main category page - ok

o1DXG.jpg

 

sub category page - i want the banner removed. is this possible? how to do it?

W1J4n.jpg

 

thanks in advance! :)

Share this post


Link to post
Share on other sites

  • 4 months later...
  • 3 months later...

I solved this problem... just replace the below code in category.tpl file in subcategories section.... but image size won't come like 125x125 pixcel.........

 

<!-- Subcategories -->
<div id="subcategories">
<p class="subcategory-heading">{l s='Subcategories'}</p>
<ul class="clearfix row">
{foreach from=$subcategories item=subcategory}
<li style="height:auto;">
                <div class="subcategory-image col-md-12 col-xs-6">
<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 img-responsive" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'category_default')|escape:'html':'UTF-8'}" alt="" />
{else}
<img class="replace-2x img-responsive" src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />
{/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'|truncate:350}</a></h5>
{if $subcategory.description}
<div class="cat_desc">{$subcategory.description}</div>
{/if}
</li>
{/foreach}
</ul>
</div>

Share this post


Link to post
Share on other sites

 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More