foxygardner Posted May 17, 2013 Share Posted May 17, 2013 The image size for the subcatory shows up with a top and bottom border so the actual thumbnail size is very small and hard to see. Is there any (simple) way to change the subcategory image size? Link to comment Share on other sites More sharing options...
Bill Dalton Posted May 17, 2013 Share Posted May 17, 2013 (edited) It's all easy ... once you know how. To change the size of your images is very easy. That said, after you change the image size you may need to make an adjustment to your theme. Depending on your theme you will need to adjust and allow for the new size. This is usually done in your CSS and sometimes hard coded into your page. If you wish to give it a try, start with Preferences > Images Here you'll find a number of sizes that are generated for every image you add to your shop. You need to determine which size your Sub Cat's are using and change the image size. You can figure this out by looking at your page code in your browser or just right click the image to get it's size. Make a note of the original size in case you change your mind and want to change back. (In Fact I always do a backup before I play with my site), After you change the size you must regenerate the images. This can take some time if you have lots of images. But you can speed this up by only regenerating the images you need. When you change the image size, notice that there are green check marks that correspond to categories. Make a note of the category that your image has a green check but pick the category that has the least amount of green checks. That way, when you regenerate the images you will regenerate the fewest images and take the least amount of time. To regenerate your images scroll down the page and find the section header - Regenerate thumbnails Choose the category we made note of from above and click Regenerate thumbnails. After it is done, you need to make sure you can see the change by turning off your cache. Please go to, Advanced Parameters > Performance Change two settings, Choose Force compilation and turn off cache. (the red X) Now take a walk around your web site and see what it looks like. Let me know. When you are done, you may turn cache back on. Edited May 17, 2013 by Bill Dalton (see edit history) 2 Link to comment Share on other sites More sharing options...
foxygardner Posted May 17, 2013 Author Share Posted May 17, 2013 Thanks for taking the time to help Bill! I did what you said and the subcategory size is a 58x58 but it uses the picture that I put in for my sub category heading which is a 500x150. If I change the medium default image size in the preference section, it will change all the areas that use 58x58 and i don't want to do that since it works well in other places. Maybe you can look at my site so you can see the problem that I'm talking about? luckyskunks.com. If you click on baby or toddler, it will come up with the small subcategory pics that I'm talking about. I'm a newbie and I would really super appreciate the help! 1 Link to comment Share on other sites More sharing options...
Bill Dalton Posted May 17, 2013 Share Posted May 17, 2013 I have never used the default theme, but when you enter a category image that is 500 by 150, your theme automatically uses that image for sub category's is that correct? Link to comment Share on other sites More sharing options...
Bill Dalton Posted May 18, 2013 Share Posted May 18, 2013 The problem created by this design is that basing an image that is square on an image that is not ... like trying to put a round peg in a square hole, it is not going to fit. So even if we change the size, we would still need to base the image on one of your other inputs. When you think about it the options all fall down. Someone may post an option here, and that would be great. But all I can suggest is the following, Here is your 500 by 150 http://luckyskunks.com/c/20-category_default/dresses.jpg Notice that it is in img/c/20-category_default/dresses.jpg Here is your subcategory image, img/c/20-medium_default/dresses.jpg These images are not used anywhere else. So you could create on your local hard drive a directory called /20-medium_default. Now you just need to put "replacement" images 58 by 58 that look the way you want them. Just the images that match the sub categories. When you are done, upload and overwrite the generated images with your custom images. Always keep a copy of the custom images in case you ever need to regenerate all images. You'll be able to replace your custom images again with one quick upload. Link to comment Share on other sites More sharing options...
foxygardner Posted May 18, 2013 Author Share Posted May 18, 2013 Bill, in answer to your question, yes my theme automatically uses the catagory image for the subcategory too. This would work beautifully if the subcategory heading would accept 500x150 but in the back office under preferences/ images, there is not a subcategory listing. Good analogy for the round peg in square hole! What you describe sounds easy enough but would you kindly give me more detail? I'm not sure how to create a directory on my local hard drive. Ideally, I would like the subcategory image to be 500 x 150 as well. Link to comment Share on other sites More sharing options...
Bill Dalton Posted May 18, 2013 Share Posted May 18, 2013 >> Ideally, I would like the subcategory image to be 500 x 150 as well Really? Ok ... lets take a look at that. First go to your theme and rename, category.tpl to categoryBACKUP.tpl Then unzip and upload the attached file. category.zip Link to comment Share on other sites More sharing options...
foxygardner Posted May 18, 2013 Author Share Posted May 18, 2013 It worked! Bill you're the best!!! 1 Link to comment Share on other sites More sharing options...
Bill Dalton Posted May 18, 2013 Share Posted May 18, 2013 Very happy that worked for you. {foreach from=$subcategories item=subcategory} <li class="clearfix"> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}" class="img"> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'category_default')}" alt="" width="{$categorySize.width}" height="{$categorySize.height}" /> This code is from your category.tpl The only change made was the directory address and the two size variables. So "medium_default" was changed to "category_default" as shown above, as well as the Width & Height variables changed to $category. Just so you know ... teach a man to fish and all that. 1 Link to comment Share on other sites More sharing options...
charliehaha Posted October 5, 2013 Share Posted October 5, 2013 Wow Bill, you are amazing!! Very good explanations!Works like a charm! 1 Link to comment Share on other sites More sharing options...
kelbel3abh Posted April 5, 2014 Share Posted April 5, 2014 I am having the same issue, but i am using the default responsive theme that now comes with Prestashop. If I add a square image, it looks crazy as the pic header on the SUbcategory page, but great for the subcategory thumbnail and visa versa. I would like a large square image for the thumbnail and a long 870x217 on the subcategory header. Are you able to help with this? 2 Link to comment Share on other sites More sharing options...
Recommended Posts