Closed deepak-netwin closed 7 years ago
Any update on this? Please see this http://prntscr.com/bmgbv8. Its showing plus (+) sign infront of each category but on clicking doesn't show anything. When I debug with firebug it has not rendered the subcategories for any parent category. Please see this http://prntscr.com/bmgchp Please advice.
See my commit: https://github.com/11mb/magento2-category-sidebar/commit/05d540f235954e1bc303c5f79b959652cc405d1e in Block/Sidebar.php file. Does that work for you?
Hi @deepak-netwin,
Sorry for the delay, do you still face this problem? Does the commit from @11mb fixes your problem?
Also, did you enable flat categories? I think that will solve your problem.
Hi @SilvanLaroo,
Everything was set properly but still It wasn't worked for me. I had added my own logic to get the category hierarchy. Also, added js code to collapse/hide sub-categories on click of plus (+) sign.
Hi @deepak-netwin, can you please share the code you added for showing plus(+) sign ? @11mb did fix the issue partially, first subcategories listed but others are hidden and signs are not visible
Thank you @deepak-netwin for quick response and updated code, but that even did not work, checked the code, it has been updated, but we are still not seeing any plus(+) sign and subcategory pages are blank with no sidebar listing, can you please guide ?
also one more issue found, after installing extension, when user log in to my account, on account page, it throws notice and errors http://example.com/customer/account, on this page, Notice: Undefined variable: categoryId in /public_html/app/code/Sebwite/Sidebar/Block/Sidebar.php(128) .... and long trail of references
Same issue : i can see the + and - for a category with subcategories but the subcategories aren't displayed. Thanks
Hi @techticdev,
I've just changed block file sidebar.php and view file sidebar.phtml. It worked for me. Check if categories are set to is anchor. Also check if categories set to flat from backend.
Hi @techticdev
I sent a pull request with a fix for this issue.
I tested it with success on Magento 2.1
i can see the + and - for a category with subcategories but the subcategories aren't displayed.
I've updated the module now and using on Magento version 2.1.1. I'm not able to attach a zip file here.
how can i display it like drop dwon menu???
Collapse and sub category listing worked after updating two files from @deepak-netwin 's code
the view/frontend/templates/sidebar.phtml and Block/sidebar.php
I initialized $categoryId = null; at line 125 in Block/sidebar.php and it worked!
The pull-requests are merged now and a new version is released. This will resolve your issues.
Hi, i installed it and it works, i want to add some new functions on it. i want to keep parent in new page too Ex: in women tops i clicked, it has 2 child and one sub-child and its true, on the top of page it shows tops. i want to show women->tops as clickable... Women |- tops |- Jacket |- Test i want function like this... on tops page forexample now its like this:
Tops (as the magneto title not in extension)
|- Jacket
|- Test
Any help?
Hi,
I have installed this extension but its not showing hierarchy. Its just showing Default Category in the left navigation. I have already set Is Anchor = Yes to all top level categories. Please suggest.