Sebwite / magento2-category-sidebar

Magento2 category sidebar extension
63 stars 58 forks source link

Not showing hierarchy #4

Closed deepak-netwin closed 7 years ago

deepak-netwin commented 8 years ago

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.

deepak-netwin commented 8 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.

11mb commented 8 years ago

See my commit: https://github.com/11mb/magento2-category-sidebar/commit/05d540f235954e1bc303c5f79b959652cc405d1e in Block/Sidebar.php file. Does that work for you?

SilvanLaroo commented 8 years ago

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.

deepak-netwin commented 8 years ago

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.

techticdev commented 8 years ago

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

deepak-netwin commented 8 years ago

Hi techticdev,

PFA zip file here.

Sebwite.zip

techticdev commented 8 years ago

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 ? sidebar

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

Choufourax commented 8 years ago

Same issue : i can see the + and - for a category with subcategories but the subcategories aren't displayed. Thanks

deepak-netwin commented 8 years ago

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.

Choufourax commented 8 years ago

Hi @techticdev
I sent a pull request with a fix for this issue. I tested it with success on Magento 2.1

bacd commented 8 years ago

i can see the + and - for a category with subcategories but the subcategories aren't displayed.

deepak-netwin commented 8 years ago

I've updated the module now and using on Magento version 2.1.1. I'm not able to attach a zip file here.

bacd commented 8 years ago

how can i display it like drop dwon menu???

shazadmaved commented 7 years ago

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!

SilvanLaroo commented 7 years ago

The pull-requests are merged now and a new version is released. This will resolve your issues.

kordzadeh commented 6 years ago

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?