Magento2: How to add new grid in Category Listing Page

Here is a tutorial on how to add new Grid in Category Listing Page. For this example we will assume we want to add a grid same as Product Category Positions for Category Brands. It should look something like below:


Assume that you have a custom module called Namespace_Module. You will create following files in your module:

Namespace_Module\view\adminhtml\ui_component\category_form.xml


Namespace_Module\Block\Adminhtml\Category\MyCustomGrid.php


Namespace_Module\view\adminhtml\templates\catalog\category\edit\assign.phtml


Namespace_Module\view\adminhtml\web\catalog\category\edit\assign.js


Namespace_Module\Controller\Adminhtml\Category\Assign.php


Namespace_Module\Block\Adminhtml\Category\Tab\MyCustomGrid.php



For saving, updating and deleting the positions you need to create plugin on category save which takes the posted json, compares with original json and performs the required operation.

Comments

Popular posts from this blog

TIPS TO SECURE A JOB AND VISA SPONSORSHIP IN THE UNITED KINGDOM

SEO for your Press Releases [Updated 2025 list]

POPULAR JOB SKILLS AND OCCUPATIONS IN THE UNITED KINGDOM