CosTed Posted April 17, 2011 Share Posted April 17, 2011 Hi all,I read a lot of post about subcategories image resizing, but i didint find a right answer. So i wanted to make subcategories bigger so i edited category.tpl file. I tried to make subcategories size like a home pictures size but the size of subcategories doesnt change at all. Here my edited code. I am using PrestaShop 1.4.0.17. getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> {if $subcategory.id_image} getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'home')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} {/if} getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'} So change $subcategory.id_image, 'medium' to $subcategory.id_image, 'home' and default-medium.jpg to default-home.jpg. But the size of subcategries stayed the same 80x80 Link to comment Share on other sites More sharing options...
DarinS Posted April 17, 2011 Share Posted April 17, 2011 I'm at work right now so i dont have access to the files, but it appears to be calling on the hook "mediumSize.width" and height under the img src tag. I would check to see what values thats bringing in as far as the height and width. Maybe you just need to recompile your website and what you changed above will work.I'm not sure if changing it from medium to home will work. Is there a "large" or "small" to change it to? Seems to me that it doesnt know what "home" is and defaulting to the alt= Link to comment Share on other sites More sharing options...
CosTed Posted April 17, 2011 Author Share Posted April 17, 2011 I used this guide.http://www.prestashop.com/forums/viewthread/15652/integration/how_can_i_resize_image_of_sub_categoriesBut for me it doesnt work maybe because i am using 1.4 prestashop. I tried to recompile my website but it doesnt work. So maybe i should change mediumSize.width to homeSize.width ? Link to comment Share on other sites More sharing options...
CosTed Posted April 17, 2011 Author Share Posted April 17, 2011 It worked ! So changing mediumSize.width to homeSize.width. Thanks to your help dude ! Link to comment Share on other sites More sharing options...
DarinS Posted April 17, 2011 Share Posted April 17, 2011 You're welcome I have been messing with PS for the past 6months or more and am just getting the hang of how it works. Link to comment Share on other sites More sharing options...
torchia Posted May 17, 2012 Share Posted May 17, 2012 doesn't work Link to comment Share on other sites More sharing options...
Nacir Posted April 10, 2013 Share Posted April 10, 2013 It worked for me (I'm on prestashop 1.5), but pictures are blurry which can easily be fixed. Thank you for your help. Link to comment Share on other sites More sharing options...
totallighting.sk Posted February 7, 2015 Share Posted February 7, 2015 This work for my in PS 1562 on product pictures: <li id="thumbnail_{$image.id_image}"> <a href="{$link->getImageLink($product->link_rewrite, $imageIds, 'thickbox_default')|escape:'html'}" rel="other-views" class="thickbox{if $smarty.foreach.thumbnails.first} shown{/if}" title="{$image.legend|htmlspecialchars}"> <img id="thumb_{$image.id_image}" src="{$link->getImageLink($product->link_rewrite, $imageIds, 'thumbnail_product')|escape:'html'}" alt="{$image.legend|htmlspecialchars}" height="60px" width="60px" /> </a> </li> Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now