jaimeweb Posted January 8, 2011 Share Posted January 8, 2011 Hi Everyone. This should be simple...but i cant work out what to remove or edit.I want to keep the sub cat images when they are all listed....but then when you click in to a sub cat i want the top image to be removed...What do i need to edit and how?I have attached an image of what i want to be removed.Thanks Link to comment Share on other sites More sharing options...
jaimeweb Posted January 9, 2011 Author Share Posted January 9, 2011 anyone help please? Link to comment Share on other sites More sharing options...
rocky Posted January 10, 2011 Share Posted January 10, 2011 Change lines 20-24 of category.tpl (in PrestaShop v1.3.5) from: {else} <!-- Category image --> {if $category->id_image} <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" /> {/if} to: {*{else} <!-- Category image --> {if $category->id_image} <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" /> {/if}*} 3 Link to comment Share on other sites More sharing options...
muratssu Posted January 10, 2011 Share Posted January 10, 2011 Verz usefull Rocky..Thank u.. Link to comment Share on other sites More sharing options...
jay187 Posted January 10, 2011 Share Posted January 10, 2011 Thanks rocky, been trying to work this out for a while. Link to comment Share on other sites More sharing options...
jay187 Posted January 12, 2011 Share Posted January 12, 2011 Rocky, how about if I wanted to also remove the small sub category images? I thought not uploading an image at all would solve this but I'm left with a 'no image available' box instead. Link to comment Share on other sites More sharing options...
rocky Posted January 13, 2011 Share Posted January 13, 2011 To remove the subcategory thumbnails, change lines 39-46 of category.tpl from: <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="" /> {else} <img src="{$img_cat_dir}default-medium.jpg" alt="" /> {/if} to: {*<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="" /> {else} <img src="{$img_cat_dir}default-medium.jpg" alt="" /> {/if} *} You may also need to edit global.css to add spacing between the subcategory names. Link to comment Share on other sites More sharing options...
jay187 Posted January 13, 2011 Share Posted January 13, 2011 You may also need to edit global.css to add spacing between the subcategory names. Hello rockyI have done this but was wondering if it was possible to display the subcategories in alphabetical order as it is now, but vertically instead of horizontally. Also, the subcategory text is centered, is there a way to make it so it isnt centered?Now the other thing is, coz I have so many subcategories it stretches my homepage too much when a category is expanded. Can I make it unexpandable? I hope this makes sense, I have included some images to show a better idea of what I mean. Sorry for so many questions and thanks again Rocky. Link to comment Share on other sites More sharing options...
jay187 Posted January 14, 2011 Share Posted January 14, 2011 Can anyone help with this? Its sending me insane! Link to comment Share on other sites More sharing options...
rocky Posted January 15, 2011 Share Posted January 15, 2011 It's actually quite difficult. If your categories don't change much, I suggest that you add prefixes in front of your categories like 01. to give the illusion that they are vertically, when they are actually listed horizontally. Link to comment Share on other sites More sharing options...
zoveress Posted April 14, 2011 Share Posted April 14, 2011 Hi, I have a question. I have many categories and I just it to be differently displayed. I found information on how to remove the category image so this is not in issue. What I would like to do now is to change the 3 columns display format to just one column. So instead of this: category1 category2 category3category4 category5 category6I would like to see this:category1category2category3category4category5category6and also I would like to resize and recolour the link characters for the subcategory links.Thanks in advance.Z. Link to comment Share on other sites More sharing options...
rocky Posted April 14, 2011 Share Posted April 14, 2011 Change the following code in the /* category.tpl */ section of global.css: body#category #subcategories li { margin-right: 10px } to: body#category #subcategories li { margin-right: 10px; clear: left } That should put each subcategory on a separate line. Link to comment Share on other sites More sharing options...
zoveress Posted April 14, 2011 Share Posted April 14, 2011 Hi, I am using a custom template and I do not seem to find this line in the tempaltes global CSS however I have a file called category.css which contains this:/* category.tpl */body#category #subcategories li { height: 136px; width: 108px; margin-right: 3px }div.cat_desc { margin: 0 1em }body#category div#subcategories .inline_list a img { display: inline }#category img#categoryImage { margin-top: 1em }Thanks Z. Link to comment Share on other sites More sharing options...
rocky Posted April 14, 2011 Share Posted April 14, 2011 Then change: body#category #subcategories li { height: 136px; width: 108px; margin-right: 3px } to: body#category #subcategories li { height: 136px; width: 108px; margin-right: 3px; clear: left } Link to comment Share on other sites More sharing options...
zoveress Posted April 15, 2011 Share Posted April 15, 2011 Thanks it works like a charm Link to comment Share on other sites More sharing options...
publitesa Posted December 22, 2011 Share Posted December 22, 2011 Hi. I need not to show top category image and I try editing category.tpl from my theme and it doesn't run... I think it's not the file I have to edit because I also tried deleting all <div class="cat_img"> div and I'm still viewing top category image... I tried editing it on my theme and on default theme with no results. I'm using 1.4.6.2 Prestashop. Can anyone help me not showing category image on the top of products list? Thanks a lot! Link to comment Share on other sites More sharing options...
Marekv Posted January 11, 2012 Share Posted January 11, 2012 I am experiencing the same problem as the previous poster publitesa. Has something changed version 1.4.6.2 Link to comment Share on other sites More sharing options...
bigkana Posted March 15, 2012 Share Posted March 15, 2012 followed rocky's instruction and it worked for me on the 1.4.6.2 version. if you're using a theme you should edit the category.tpl file there. Link to comment Share on other sites More sharing options...
Peda Posted September 5, 2012 Share Posted September 5, 2012 Hi, thank you very much for the solution of hiding all images from all subcategory levels. Is it possible to show images in subcategory-1 list but hide images in subcategory-2 list? Regards Link to comment Share on other sites More sharing options...
Bejo Posted October 9, 2012 Share Posted October 9, 2012 dear rocky's Thank for great information. can you help me to make product not display at main category. example : *Human - sub cate= 1. man 2. woman when the people click kategory, the sub cate = man & woman appears, and the bottom of sub cat the list product is appears. how to make it not display at there? thank i can not figure it how to it.thx Link to comment Share on other sites More sharing options...
comprausa Posted January 23, 2013 Share Posted January 23, 2013 Is it possible to: HIDE subcategories' thumbnails when the subcategory HAS NO image, SHOW subcategories' thumbnails when the subcategory HAS AN Image. Thanks. Link to comment Share on other sites More sharing options...
tfrangi Posted June 26, 2013 Share Posted June 26, 2013 Hi, I up this topic because @comprausa you asked exactly for the point I'm working on, it's been hours I try differents things in the category.tpl file but I didn't managed anything (I even try to put php directly in the file between {php} tags...). So if anyone have the answer to do that : If an image associate to a category or subcategory exits --> so display it if NOT --> don't display the default image ! I really thank the one that can help me fast. TF Link to comment Share on other sites More sharing options...
djrustynko Posted April 28, 2014 Share Posted April 28, 2014 Change lines 20-24 of category.tpl (in PrestaShop v1.3.5) from: {else} <!-- Category image --> {if $category->id_image} <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" /> {/if} to: {*{else} <!-- Category image --> {if $category->id_image} <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" /> {/if}*} prestashop 1.5.6.2 work ? Link to comment Share on other sites More sharing options...
ukmatern Posted June 9, 2014 Share Posted June 9, 2014 Change lines 20-24 of category.tpl (in PrestaShop v1.3.5) from: {else} <!-- Category image --> {if $category->id_image} <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" /> {/if} to: {*{else} <!-- Category image --> {if $category->id_image} <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" /> {/if}*} Hi I would also like to know does this work for prestashop 1.5.6.2. I have the same version and im changing it as instructed but I cant get it to work and i dont know if im doing it wrong or its just out of date. Help Please! Regards Link to comment Share on other sites More sharing options...
shrinidhim Posted September 25, 2014 Share Posted September 25, 2014 you can also disable in preferences>images>category_default disable categories.. then you can see only description and category name Link to comment Share on other sites More sharing options...
harisri9696 Posted October 12, 2014 Share Posted October 12, 2014 i cannot find subcategories globel .css in whare is subcatogories line .i cannot find please help.iam using prestashop 1.6 Link to comment Share on other sites More sharing options...
shv Posted October 20, 2014 Share Posted October 20, 2014 HI, I'd need the same modification (removing category pictures on listing pages) but for the PS 1.6.0.8 now. What would be the best way of doing it? Many thanks, shv Change lines 20-24 of category.tpl (in PrestaShop v1.3.5) from: {else} <!-- Category image --> {if $category->id_image} <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" /> {/if} to: {*{else} <!-- Category image --> {if $category->id_image} <img src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category')}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" /> {/if}*} Link to comment Share on other sites More sharing options...
reno123 Posted October 22, 2014 Share Posted October 22, 2014 I 've the same issue to do Advice from shrinidhim (disable category_deafault images) do not work. Mayby deleting it helps, but what if after some time I would like to recover the images for categories. So mayby other trick ? HI, I'd need the same modification (removing category pictures on listing pages) but for the PS 1.6.0.8 now. What would be the best way of doing it? Many thanks, shv Link to comment Share on other sites More sharing options...
shv Posted October 22, 2014 Share Posted October 22, 2014 (edited) Hi reno123, I found the solution now, perhaps it helps you as well. 1. Category pics - just disable in PS category settings (via a simple ¨edit¨ in PS back office, as suggested above); 2. The same trick does not work on subcategories though if one wants to keep subcategory pics for displaying them on category listing pages (but omit displaying them on respective subcategory listing pages) - so one needs to modify the category.tpl file instead. Simple modification is just as described below, to comment part of the code: http://www.prestashop.com/forums/topic/336397-remove-subcategory-image-on-product-list-page/ The manipulation which worked for me from those listed in the above link (you can try it first, and if not working, go to the above link to see more possibilities) is as follows: One needs to change category.tpl from: <!-- Category image --> <div class="content_scene_cat_bg"{if $category->id_image} style="background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat; background-size:cover; min-height:{$categorySize.height}px;"{/if}> {if $category->description} <div class="cat_desc"> <span class="category-name"> {strip} {$category->name|escape:'html':'UTF-8'} {if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'} {/if} {/strip} </span> {if Tools::strlen($category->description) > 350} <div id="category_description_short" class="rte">{$description_short}</div> <div id="category_description_full" class="unvisible rte">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='More'}</a> {else} <div class="rte">{$category->description}</div> {/if} </div> {/if} </div> {/if} </div> to: <!-- Category image --> {* <div class="content_scene_cat_bg"{if $category->id_image} style="background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) right center no-repeat; background-size:cover; min-height:{$categorySize.height}px;"{/if}> {if $category->description} <div class="cat_desc"> <span class="category-name"> {strip} {$category->name|escape:'html':'UTF-8'} {if isset($categoryNameComplement)} {$categoryNameComplement|escape:'html':'UTF-8'} {/if} {/strip} </span> {if Tools::strlen($category->description) > 350} <div id="category_description_short" class="rte">{$description_short}</div> <div id="category_description_full" class="unvisible rte">{$category->description}</div> <a href="{$link->getCategoryLink($category->id_category, $category->link_rewrite)|escape:'html':'UTF-8'}" class="lnk_more">{l s='More'}</a> {else} <div class="rte">{$category->description}</div> {/if} </div> {/if} </div> *} {/if} </div> It just comments part of the code, so one can go back to the file and simply enable it (by erasing comment signs) in case of necessity. Hope that helps, shv I 've the same issue to do Advice from shrinidhim (disable category_deafault images) do not work. Mayby deleting it helps, but what if after some time I would like to recover the images for categories. So mayby other trick ? Edited October 22, 2014 by shv (see edit history) Link to comment Share on other sites More sharing options...
idoityourself Posted October 24, 2014 Share Posted October 24, 2014 (edited) I have 1.6 and have it turned off on category_default under images but they are still showing. Any ideas? Id like to keep little tumbnails on categories but when you click through not have the big image displayed across the top. category.tpl has this {if $category->id_image} <img class="img-responsive" src="{$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}" alt="{$category->name|escape:'htmlall':'UTF-8'}" title="{$category->name|escape:'htmlall':'UTF-8'}" id="categoryImage" /> thanks Edited October 24, 2014 by idoityourself (see edit history) Link to comment Share on other sites More sharing options...
reno123 Posted October 24, 2014 Share Posted October 24, 2014 This works for me: In file category.tpl you have to delete the code: {if $category->id_image} style="background:url({$link->getCatImageLink($category->link_rewrite, $category->id_image, 'category_default')|escape:'html':'UTF-8'}) 0 top no-repeat; background-size:contain; min-height:{$categorySize.height}px;"{/if} but not whole line - only the code above. Only disadventage of this is theblack strip over the name of the category is left - I do not know how to remove it. Mayby sombody alse know it ? Link to comment Share on other sites More sharing options...
slider2nl Posted March 7, 2015 Share Posted March 7, 2015 (edited) I also want to remove the top image i disabled it from the back office and even removed it from settings -> images -> category_default 870x217 tryed the codes and removed the codes i everytime i end up as image above. i think it's the text part of it, but i cant find it to remove that part as well the question is can it be removed totaly without losing the tumbnails of the subcategory and products..Extra info using 1.6.0.13 Edited March 10, 2015 by slider2nl (see edit history) Link to comment Share on other sites More sharing options...
Martin_Movingcrew Posted March 22, 2015 Share Posted March 22, 2015 Hello, It seems that alot of PS users want the same thing, but after scrolling true 40 pages on this forum i still can't find the solution for this problem. Even don't understand why the function is there, because it looks like (!@#$) Greets Martin Ps 1.6.0.11 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