Jump to content

[SOLVED] Subcategories - image resize


Recommended Posts

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

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

  • 1 year later...
  • 10 months later...
  • 1 year later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...