├── README.md
└── XIT
└── SideCat
├── Block
└── CategorisCollection.php
├── README.md
├── etc
├── di.xml
└── module.xml
├── registration.php
└── view
└── frontend
├── layout
└── cms_index_index.xml
└── templates
└── storecategories.phtml
/README.md:
--------------------------------------------------------------------------------
1 | # Magento-2-category-collection-on-side-bar-section-menu-responsive-free-
2 | 1. Just download the SideCat Extention for magneto 2 (all 2 version)
3 | 2. Upload in app/code/XIT/SideCat
4 | 3. Magento Setup:Upgrade
5 | 4. Indexer
6 | 5. Cache Flush
7 |
8 | Side menu will added auto on your magento 2 store
9 |
10 |
--------------------------------------------------------------------------------
/XIT/SideCat/Block/CategorisCollection.php:
--------------------------------------------------------------------------------
1 | _categoryHelper = $categoryHelper;
23 | $this->categoryFlatConfig = $categoryFlatState;
24 | $this->topMenu = $topMenu;
25 | parent::__construct($context);
26 | }
27 | /**
28 | * Return categories helper
29 | */
30 | public function getCategoryHelper()
31 | {
32 | return $this->_categoryHelper;
33 | }
34 |
35 | /**
36 | * Return categories helper
37 | * getHtml($outermostClass = '', $childrenWrapClass = '', $limit = 0)
38 | * example getHtml('level-top', 'submenu', 0)
39 | */
40 | public function getHtml()
41 | {
42 | return $this->topMenu->getHtml();
43 | }
44 | /**
45 | * Retrieve current store categories
46 | *
47 | * @param bool|string $sorted
48 | * @param bool $asCollection
49 | * @param bool $toLoad
50 | * @return \Magento\Framework\Data\Tree\Node\Collection|\Magento\Catalog\Model\Resource\Category\Collection|array
51 | */
52 | public function getStoreCategories($sorted = false, $asCollection = false, $toLoad = true)
53 | {
54 | return $this->_categoryHelper->getStoreCategories($sorted , $asCollection, $toLoad);
55 | }
56 | /**
57 | * Retrieve child store categories
58 | *
59 | */
60 | public function getChildCategories($category)
61 | {
62 | if ($this->categoryFlatConfig->isFlatEnabled() && $category->getUseFlatResource()) {
63 | $subcategories = (array)$category->getChildrenNodes();
64 | } else {
65 | $subcategories = $category->getChildren();
66 | }
67 | return $subcategories;
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/XIT/SideCat/README.md:
--------------------------------------------------------------------------------
1 |
2 | ##Manual installation :
3 |
4 | download from github
5 |
6 | past in your folder app/code
7 |
8 | enable extension in app/etc/config.php by adding 'Ibnab_CategoriesSide' => 1,
9 |
10 | and execute the command php bin/magento setup:upgrade
11 |
--------------------------------------------------------------------------------
/XIT/SideCat/etc/di.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |