stavrosvorkas Posted August 12, 2016 Share Posted August 12, 2016 (edited) Hey I am currently creating a store but the shop has TONES of categories with subcategories and subcategories. For Example: ->Main Category -Subcategory A(no products in here) -Sub Subcategory A(products inside here) -Sub Subcategory A(products inside here) -Subcategory B -Sub Subcategory B(products here) -Sub Subcategory B(products here) etc etc etc Now the issue is if I click the menu Item "Main Category" I am displayed with a horrid page with all 2nd level subcategories ("Subcategory A", "Subcategory B") that require a thumbnail otherwise I get "no image available". Now I would normally not complain and be lazy but this store has over 150 subcategories. Is there a way to remove these pages? or make the menu items : "Main Category" and "subcategory A" "Subcategory B" be unclickable? to see an actual example of the test site I am working on follow this link: http://cycheapersupplements.com/index.php?id_category=59&controller=category&id_lang=1 -Subcategory B Edited August 12, 2016 by stavrosvorkas (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted August 12, 2016 Share Posted August 12, 2016 I have an AJAX Sliding Categories module with an accordion mode that would work well for you, but it's a paid module. If you're looking for a free solution, you could edit category-tree-branch.tpl in your theme's directory and change line 27 from: <a href="{$node.link|escape:'html':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'html':'UTF-8'}">{$node.name|escape:'html':'UTF-8'}</a> to: {if $node.children == 0}<a href="{$node.link|escape:'html':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'html':'UTF-8'}">{/if}{$node.name|escape:'html':'UTF-8'}{if $node.children == 0}</a>{/if} This should remove the link if a node has children. Link to comment Share on other sites More sharing options...
stavrosvorkas Posted August 12, 2016 Author Share Posted August 12, 2016 First and foremost thank you for your response rocky. That is indead a very interesting plugin that I will probably use toward the end of my development cycle. But you seem to have missunderstood the issue at hand. My problem is with the actual pages of subcategories. As it generates pages that do not display products but actually display categories with "no image found". In my opinion this is rather useless.. especially when you use prestashop for a large online store with hundreds of categories and subcategories. Because this will basically automatically create a lot of pages with no content other than category names.. now I did find a module that removes subcategories (as you wish) but I am not certain this is the best solution available and it I would think that there is an easy way of doing it (obviously I was mistaken) Link to comment Share on other sites More sharing options...
vekia Posted August 12, 2016 Share Posted August 12, 2016 it will be little hard to "remove" these pages, and it can hurt your seo, because prestashop will: - generate links to these category pages - if you will remove these pages - the effect will be 404 page, or some redirection Maybe it is worth to:- remove picture if there is no image thumb for category- create nice looking list of subcategories - display products from subcategories pages will not be "empty", and this can be a compromise between usability and seo, i think Link to comment Share on other sites More sharing options...
stavrosvorkas Posted August 12, 2016 Author Share Posted August 12, 2016 Finally figured out a workaround. If you disable subcategories in theme customization and edit a products associations to include parent category + sub category + sub sub category it will display only the products belonging to that category rather than category names 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