Jump to content

Subcategory image is too tiny. How can I change it?


Recommended Posts

Hi,

I have a catalog with a few categories that have sub categories.

Now, when viewing the category page (front office), I see the thumbnails of the sub category images.

But, the size is too small to my liking, so I thought this should be easy to change in preferences - images.

 

The medium size, as I noticed, is used as the sub category thumb, and all product sidebars (new / viewed etc.)

 

So in the medium image, I set the "apply to category" radio to false and created a new size, and set it to only apply to categories.

 

This does not work. Is there a way to set a different thumbnails size to sub category thumbs and medium product (80x80)?

 

Thanks.

Link to comment
Share on other sites

Do you use the default template? If you have an alternative template it may be that some things are hard coded in their Category.tpl template file.

 

Do you use 1.4 or 1.5?

 

Can you look at the source code of your of your webpage and tell us how the link to the images looks like. The fault can be at different levels:

- it may be that the image still points to the old "medium" format

- it may be that the new format has not the right size.

- it may be that it points to the right picture but that the link still contains the "height=80 width=80" attributes.

Link to comment
Share on other sites

Yes, I have an alternative template. I'm using 1.4.7.3

In category.tpl template file the subcategories DIV shows:

 

 

<div id="subcategories">

<h3>{l s='Subcategories'}</h3>

<ul class="inline_list">

{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}

</ul>

<div class="clearblock"></div>

</div>

 

How should I change it?

 

Thanks

Link to comment
Share on other sites

Hi,

I have a catalog with a few categories that have sub categories.

Now, when viewing the category page (front office), I see the thumbnails of the sub category images.

But, the size is too small to my liking, so I thought this should be easy to change in preferences - images.

 

The medium size, as I noticed, is used as the sub category thumb, and all product sidebars (new / viewed etc.)

 

So in the medium image, I set the "apply to category" radio to false and created a new size, and set it to only apply to categories.

 

This does not work. Is there a way to set a different thumbnails size to sub category thumbs and medium product (80x80)?

 

Thanks.

 

 

 

You need to edit "CategoryController.php" in the "controllers" directory:

 

Goto "line 142" or find "'mediumSize' => Image::getSize('medium'),"

 

Replace

 

'mediumSize' => Image::getSize('medium'),

 

With

 

'mediumSize' => Image::getSize('
TheNameOfYourNewSize
'),

 

TheNameOfYourNewSize is the name of the new image size you mentioned and created in your post.

Link to comment
Share on other sites

×
×
  • Create New...