Magento 2: Add new button on Category Edit Page in Admin Panel

For this example we will assume you have a custom module. Let's call it Namespace_Module.

Now, create files as below:

Namespace_Module\view\adminhtml\ui_component\category_form.xml


Namespace_Module\Block\Adminhtml\Category\Edit\Button\AssignButton.php


Namespace_Module\Controller\Adminhtml\Category\Assign.php


Voila !! That's it. Now, clear all caches and check the category page in admin panel. There will be a new button called "Assign".

Comments

Popular posts from this blog

XDebug - PHPStorm - Mac: How to configure Xdebug with PHPStorm on Mac OS and PHP 7.3

Magento 2 - Vue Storefront PWA Integration: How to create a new VSBridge indexer job and Elastic Index for your custom module