ShirtSeller Posted January 2, 2012 Share Posted January 2, 2012 Hey all - running a new install of 1.4.6.2. When a customer clicks on a category it normally lands on that category page and displays images and links of any subcategory and then all of the products below that. I want to remove that section that shows any subcategories and want it to look like a category with no subs. Two attachments: Remove sub shows the category that has sub cats (that I want to remove) I would like it to look the same as a category with no subs (no sub cats image) Thanks in advance for any assistance! Joe Link to comment Share on other sites More sharing options...
Mike Kranzler Posted January 2, 2012 Share Posted January 2, 2012 Hi ShirtSeller, Just to make sure I understand you correctly, you want to have subcategories created, but not visible within the parent category? -Mike Link to comment Share on other sites More sharing options...
ShirtSeller Posted January 3, 2012 Author Share Posted January 3, 2012 Hi ShirtSeller, Just to make sure I understand you correctly, you want to have subcategories created, but not visible within the parent category? -Mike Hi Mike - yes, exactly! Link to comment Share on other sites More sharing options...
Mike Kranzler Posted January 3, 2012 Share Posted January 3, 2012 Hi ShirtSeller, This will likely require some custom code changes, as it is not something programmed into PrestaShop by default. -Mike Link to comment Share on other sites More sharing options...
ShirtSeller Posted January 3, 2012 Author Share Posted January 3, 2012 That's what I thought. I thought I could just comment out some code in a tpl or php page but could night find the right spot. Link to comment Share on other sites More sharing options...
Mike Kranzler Posted January 3, 2012 Share Posted January 3, 2012 If you'd like, I'd be happy to get you set up with a developer who can help you out with this custom coding. If you're interested, just let me know. -Mike Link to comment Share on other sites More sharing options...
ShirtSeller Posted January 5, 2012 Author Share Posted January 5, 2012 Thanks Mike. I'll poke around a bit and let you know if I need to go in that direction. Link to comment Share on other sites More sharing options...
Mike Kranzler Posted January 5, 2012 Share Posted January 5, 2012 OK, good luck! -Mike Link to comment Share on other sites More sharing options...
Joeri Vos Posted January 9, 2012 Share Posted January 9, 2012 If I understand correctly, this is very easy.. Remove this part of the code from category.tpl {if isset($subcategories)} <!-- Subcategories --> <div id="subcategories"> <h3>{l s='Subcategories'}</h3> <ul class="inline_list"> {foreach from=$subcategories item=subcategory} <li> <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="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a><br /> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> </li> {/foreach} </ul> <br class="clear"/> </div> {/if} 5 Link to comment Share on other sites More sharing options...
El Patron Posted January 12, 2012 Share Posted January 12, 2012 If I understand correctly, this is very easy.. Remove this part of the code from category.tpl {if isset($subcategories)} <!-- Subcategories --> <div id="subcategories"> <h3>{l s='Subcategories'}</h3> <ul class="inline_list"> {foreach from=$subcategories item=subcategory} <li> <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="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a><br /> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> </li> {/foreach} </ul> <br class="clear"/> </div> {/if} Works great, thanks for the tip Joeri Vos. 1 Link to comment Share on other sites More sharing options...
Mike Kranzler Posted January 16, 2012 Share Posted January 16, 2012 Hi ShirtSeller, Did Joeri Vos' suggestion work for you? -Mike Link to comment Share on other sites More sharing options...
Timothy Jarman Posted March 10, 2012 Share Posted March 10, 2012 Thank you so much Joeri Vos, nice to see people helping each other rather than trying to make money. I have learnt a lot from people like you, if I had to pay for everything I would never learn. Link to comment Share on other sites More sharing options...
gadgetwheels Posted April 29, 2012 Share Posted April 29, 2012 hello guys, Its not working for me. i tried lots of time. i'v delete those lines from themes>"my current theme">categorei.tpl ! right! Link to comment Share on other sites More sharing options...
makoba Posted April 29, 2012 Share Posted April 29, 2012 hi guys. Please check out below link. it is exactly what you are asking for. It is a free module. http://www.nethercottconstructions.com/en/prestashop-modules/1-ajax-sliding-categories.html It is free with out the ajax. A very good module. Link to comment Share on other sites More sharing options...
Dan1 Posted May 12, 2012 Share Posted May 12, 2012 Joeri Vos suggestion works in PS 1.4.7.3 thank you. Link to comment Share on other sites More sharing options...
Campbell Posted May 19, 2012 Share Posted May 19, 2012 Thanks Joeri Vos a much cleaner look Link to comment Share on other sites More sharing options...
raza Posted June 4, 2012 Share Posted June 4, 2012 Hi Mike Kranzler, I have a problem here that my all subcategories products displays into parent category how can I fix it. please help ASAP. I will be yery thankful to you. Link to comment Share on other sites More sharing options...
mohitsareen Posted July 21, 2012 Share Posted July 21, 2012 Hi I am looking for another variation of this. Let me know if someone can help... I need to display only some selected subcategories on the category page. So basically i want user to mark which subcategory appear on the parent category page and then based on that selection the selected subcategories appear for respective categories? Please help Thanks Link to comment Share on other sites More sharing options...
Ajax30 Posted February 14, 2013 Share Posted February 14, 2013 In your theme, in the category.css find #subcategories and add display:none Example: #subcategories {margin-top:15px; display:none;} 2 Link to comment Share on other sites More sharing options...
flipe Posted October 21, 2013 Share Posted October 21, 2013 If you want remove the big one too, just put the same option there: .content_scene_cat { padding:5px; display:none; border:1px solid #ccc; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; -moz-box-shadow: 0 1px 1px #e2e2e2; -webkit-box-shadow: 0 1px 1px #e2e2e2; box-shadow: 0 1px 1px #e2e2e2;} Link to comment Share on other sites More sharing options...
vekia Posted October 21, 2013 Share Posted October 21, 2013 well, it's a bit old topic and latest reply was in february what you mean by "big one too" ? Link to comment Share on other sites More sharing options...
flipe Posted October 21, 2013 Share Posted October 21, 2013 what you mean by "big one too" ? Category image Link to comment Share on other sites More sharing options...
vekia Posted October 23, 2013 Share Posted October 23, 2013 ok now everything is clear thank you for clarification Link to comment Share on other sites More sharing options...
UgoDutil Posted May 25, 2014 Share Posted May 25, 2014 (edited) See next post... Edited May 25, 2014 by UgoDutil (see edit history) Link to comment Share on other sites More sharing options...
UgoDutil Posted May 25, 2014 Share Posted May 25, 2014 If I understand correctly, this is very easy.. Remove this part of the code from category.tpl {if isset($subcategories)} <!-- Subcategories --> <div id="subcategories"> <h3>{l s='Subcategories'}</h3> <ul class="inline_list"> {foreach from=$subcategories item=subcategory} <li> <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="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a><br /> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> </li> {/foreach} </ul> <br class="clear"/> </div> {/if} Thanks Joeri! This still works in prestashop 1.6 1 Link to comment Share on other sites More sharing options...
marco78 Posted October 3, 2014 Share Posted October 3, 2014 Joeri Vos #9 in my theme there was not this code, i added this to my category.tpl and now all subcategories are correctly visible, except that they are placed in a single column, there's a solution to divide in two or three columns? thank you Link to comment Share on other sites More sharing options...
somits1 Posted February 20, 2015 Share Posted February 20, 2015 Hi, This is Somit and running my site http://slmobileprice.com using prestashop v1.5.6.2 english. In this version this code not available. In my site i want to hide categories from center (above product page). Whenever i click on Categories their subcategories also showing on product page. So could you please tell me how to hide subcategories from the product page.. Please check screen shot. Thanks, Somit Link to comment Share on other sites More sharing options...
Danny Moreno Posted August 20, 2015 Share Posted August 20, 2015 (edited) Hey everyone, you can always hide the sub-categories from the category page directly from your themes configurator option or if that's not working for ya, here's a little module that'll hide your sub-categories in your category page. Just install and enable, if you want to show them again just disable the module. If you have any issues with the module send me a message and i'll make any changes necessary. -Best regards techdancustom.zip Edited August 22, 2015 by Guest2015 (see edit history) 1 Link to comment Share on other sites More sharing options...
gioiellando Posted February 10, 2016 Share Posted February 10, 2016 Thank you Joeri Vos Link to comment Share on other sites More sharing options...
therefinerz Posted March 10, 2016 Share Posted March 10, 2016 Works great, thanks for the tip Joeri Vos. Didnt find the code. My .tpl code goes like this: {if isset($subcategories)} {if (isset($display_subcategories) && $display_subcategories eq 1) || !isset($display_subcategories) } <!-- Subcategories --> <div id="subcategories"> <p class="subcategory-heading">{l s='Subcategories'}</p> <ul class="clearfix"> {foreach from=$subcategories item=subcategory} <li> <div class="subcategory-image"> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}" title="{$subcategory.name|escape:'html':'UTF-8'}" class="img"> {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} and if I delete these, my whole site vanishes. Link to comment Share on other sites More sharing options...
kirancshet Posted May 11, 2016 Share Posted May 11, 2016 I am very late in here, but just in case if someone is interested, there is a tiny little hack you can do. 1. Login to the database. 2. In the configuration table, check for PS_SET_DISPLAY_SUBCATEGORIES 3. By default it is set to 1. Change it to 0. This will disable all the subcategories. Thanks Kiran Link to comment Share on other sites More sharing options...
somits1 Posted August 12, 2016 Share Posted August 12, 2016 Hi, I am using prestashop 1.6.4. could you please tell me how to hide subacategories from product page. My site is http://www.kausamobile.com Thanks, Somit Link to comment Share on other sites More sharing options...
vekia Posted August 12, 2016 Share Posted August 12, 2016 step by step tutorial: disable subcategories list from category page open "theme configurator" module settings page, there is an option to enable / disable subcategories Link to comment Share on other sites More sharing options...
somits1 Posted August 12, 2016 Share Posted August 12, 2016 Thanku so much Vekia. done. Link to comment Share on other sites More sharing options...
Recommended Posts