uapone Posted September 19, 2012 Share Posted September 19, 2012 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 More sharing options...
rseigel Posted September 19, 2012 Share Posted September 19, 2012 Have you looked at Preferences > Image? Link to comment Share on other sites More sharing options...
musicmaster Posted September 20, 2012 Share Posted September 20, 2012 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 More sharing options...
uapone Posted September 20, 2012 Author Share Posted September 20, 2012 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 More sharing options...
musicmaster Posted September 21, 2012 Share Posted September 21, 2012 Can you also have a look at the source code (html-code) of your category pages? Link to comment Share on other sites More sharing options...
uapone Posted September 21, 2012 Author Share Posted September 21, 2012 Hi, under the category page source code I found height="20px" in the img class of all my subcategories images. That might be the problem, right? And how should I change them? Thank you Link to comment Share on other sites More sharing options...
yewster Posted September 22, 2012 Share Posted September 22, 2012 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 More sharing options...
uapone Posted September 25, 2012 Author Share Posted September 25, 2012 Actually, I found the css document under my theme###/cache that control the image size. After I change that, everything is fine now. Thank you for all the help. Link to comment Share on other sites More sharing options...
Recommended Posts