wmh90 Posted April 24, 2016 Share Posted April 24, 2016 (edited) Hello, I'm facing an annoying issue on my store. Searched in some topics and there's a lot of people with the same issue. My configuration is Prestashop 1.6.1.4 and I'm using Transformer Theme. The problem is the Category thumbnail from the category and sub-category pages. I upload them via BO and they appear in the BO but in the Front Office, it just appear the "No Image available" image I've uploaded. The files are being uploaded to img/c folder correctly I guess, as: 12-medium-default.jpg; 12_thumb.jpg and so on... I tryed the fix of regenerating the thumbnails but when I do that, the images from the BO just disappear too. I did a F12 in Chrome and look at what folder it was linking the image and is a folder that didn't exist: http://mysite.com.br/loja/c/br-default-medium_default/lps-long-plays.jpg I am guessing this might be some upload image core problem, I really don't know what is happening. Even in the img/c folder there's nothing about those files/folders that it is looking for. It seems it is getting the friendly-url I'm using as the name of the file... I could create that folder and rename all my category images (which is a lot of work), but there must have a fix for this as I could see there's a lot of people facing it or some variation of this. Edited April 26, 2016 by wmh90 (see edit history) Link to comment Share on other sites More sharing options...
wmh90 Posted April 25, 2016 Author Share Posted April 25, 2016 (edited) It has something to do with the category.tpl file. I found it! OMG I can't believe I solved this by my own! The original sentence is: {if $subcategory.id_image} <img class="replace-2x" src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium_default')|escape:'html':'UTF-8'}" alt="{$subcategory.name|escape:'html':'UTF-8'}" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img class="replace-2x" src="{$img_cat_dir}{$lang_iso}-default-medium_default.jpg" alt="{$subcategory.name|escape:'html':'UTF-8'}" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} I replaced the original code of my theme (it has some modifications, but these lines are identical to the main theme) with: {if $subcategory.id_image} <img class="replace-2x" src="{$img_cat_dir}{$subcategory.id_category}-medium_default.jpg" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}{$lang_iso}-default-medium_default.jpg" alt="{$subcategory.name|escape:'html':'UTF-8'}" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} And there it is! At least to me, the problem was solved and my sub-categories images are showing perfectly! I don't know what will happen if you restore images, but at a first glance, it is solved! Let's spread the word to everyone with the same problem! Edited June 21, 2016 by wmh90 (see edit history) 3 Link to comment Share on other sites More sharing options...
Travis_Morton Posted May 4, 2016 Share Posted May 4, 2016 I noticed that Category Thumbnails would not show up unless I uploaded a Category Cover Image too. 1 Link to comment Share on other sites More sharing options...
wmh90 Posted May 5, 2016 Author Share Posted May 5, 2016 I don't use Category Cover, so I can't say anything, but, in my case, doing what I mentioned above make the thumbnails to work, without the cover need. Link to comment Share on other sites More sharing options...
indigo380 Posted May 19, 2016 Share Posted May 19, 2016 This worked for me! Thank you!!! Link to comment Share on other sites More sharing options...
kloom00 Posted May 25, 2016 Share Posted May 25, 2016 Thanx for your solution. It works perfectly. Link to comment Share on other sites More sharing options...
cvanavi Posted June 21, 2016 Share Posted June 21, 2016 I'm really new to PrestaShop and have spent 2 days trying to figure out everything. Wmh09, can you please dummify everthing for me? Step by step click instructions appreciated. Link to comment Share on other sites More sharing options...
wmh90 Posted June 21, 2016 Author Share Posted June 21, 2016 I'm really new to PrestaShop and have spent 2 days trying to figure out everything. Wmh09, can you please dummify everthing for me? Step by step click instructions appreciated. It's not that hard. You will have to open your FTP and browse to your theme folder like: store/themes/default and find the file named category.tpl. After that, you have to copy the first code I quoted above and find it in your file, then replace for the second code mentioned. Not so hard. Link to comment Share on other sites More sharing options...
hakeryk2 Posted June 26, 2016 Share Posted June 26, 2016 This forum needs to have better SEO because It was already figured out with same solution: https://www.prestashop.com/forums/topic/506210-categories-and-subcategories-thumnails-not-working/ Link to comment Share on other sites More sharing options...
wmh90 Posted June 26, 2016 Author Share Posted June 26, 2016 Agree hakeryk2; it's exactly the same problem that yours and when I searched the forum, your topic didn't showed in results, but we found the same solution, this is cool and strange at same time Link to comment Share on other sites More sharing options...
timonandries Posted October 24, 2016 Share Posted October 24, 2016 (edited) EDIT: Found a solution. If I just upload an image under category thumbnail (together with whm90's fix) it works like I want. Hello, I've added your solution wmh90 and it works so thank you. But I have another question, now you need to add an image for the cover. But what do you need to do if you only want the thumbnails? I only want the images shown when you click in the menubar on a parent category. When you know click on a subcategory I don't want the cover displayed. Edited October 24, 2016 by timonandries (see edit history) Link to comment Share on other sites More sharing options...
Neustart Posted November 20, 2016 Share Posted November 20, 2016 Good question, I wish it would be possible to enable thumbnails for subcategories without showing the banner image. Link to comment Share on other sites More sharing options...
kirubanidhi Posted April 26, 2018 Share Posted April 26, 2018 Categories and subcategories image is not showing in Front office. I attached my image file. How to resolve my problem. Please give me proper solution. 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