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

Magento 2: How to create new indexer for your custom module

Xdebug - PHPStorm - Ubuntu: How to configure Xdebug on Ubuntu for PHPStorm

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