renjii Posted September 5, 2013 Share Posted September 5, 2013 Hi All I've set up some sub categories what troubles me is when i click on the subcategories it is showing an empty image. May i know how to remove that out from subcategories ? The reason i want to remove it is because i dont any picture that is match for the subcategories Thanks Link to comment Share on other sites More sharing options...
Carlsen Posted September 7, 2013 Share Posted September 7, 2013 (edited) Hi Renjii, This is how you remove pictures completely from all subcategories. A picture will not show, even if you have assigned a picture to the subcategory: • Go to your theme directory (If you are using default themes, then it is the default folder inside the themes directory) • Open the file category.tpl • Search for {if isset($subcategories)} • Below the {if isset($subcategories)}, you must remove this: <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, 'medium_default')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a> • Save your category.tpl file and upload it to the appropriate directory on your server That should do it! Edited September 7, 2013 by Carlsen (see edit history) 1 Link to comment Share on other sites More sharing options...
vekia Posted September 7, 2013 Share Posted September 7, 2013 you can also do it with css styles, with this code: #categoryImage {display:none;} Link to comment Share on other sites More sharing options...
renjii Posted September 7, 2013 Author Share Posted September 7, 2013 Hi Renjii, This is how you remove pictures completely from all subcategories. A picture will not show, even if you have assigned a picture to the subcategory: • Go to your theme directory (If you are using default themes, then it is the default folder inside the themes directory) • Open the file category.tpl • Search for {if isset($subcategories)} • Below the {if isset($subcategories)}, you must remove this: <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, 'medium_default')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium_default.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a> • Save your category.tpl file and upload it to the appropriate directory on your server That should do it! Hi Carlsen Thanks a lot ! your code is working for me you can also do it with css styles, with this code: #categoryImage {display:none;} Hi vekia which css file should i change ? Link to comment Share on other sites More sharing options...
vekia Posted September 7, 2013 Share Posted September 7, 2013 you can do it in global.css file located in your theme/YOUR_THEME/css directory im going to mark this thread as solved best regards Link to comment Share on other sites More sharing options...
totallighting.sk Posted November 26, 2013 Share Posted November 26, 2013 This is not working in 1.5.6.1 ... Link to comment Share on other sites More sharing options...
vekia Posted November 26, 2013 Share Posted November 26, 2013 it works in all shops with the same code in theme. after any change in the .tpl file make sure that you have feature to recompile theme turned on (force compile option under adv. preferneces > performance tab) Link to comment Share on other sites More sharing options...
Recommended Posts