{"id":1709,"date":"2020-04-02T08:51:46","date_gmt":"2020-04-02T08:51:46","guid":{"rendered":"https:\/\/www.magetop.com\/blog\/?p=1709"},"modified":"2021-07-22T02:56:05","modified_gmt":"2021-07-22T02:56:05","slug":"how-to-add-mass-actions-in-magento","status":"publish","type":"post","link":"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/","title":{"rendered":"How To Add Mass Actions In Magento 2"},"content":{"rendered":"\n<p>In the previous lesson, I showed you <a rel=\"noreferrer noopener\" href=\"https:\/\/www.magetop.com\/blog\/how-to-custom-admin-grid-in-magento\/\" target=\"_blank\">How To Custom Admin Grid In Magento 2<\/a>. Following that lesson, I will show you How To Add Mass Actions In Magento 2.<\/p>\n\n\n\n<p>This is a series on Magento 2 Extension Tutorial. The lessons are related to each other so you should read the previous lessons to be able to do this lesson.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Module File Structure<\/h2>\n\n\n\n<p>We updated our module file structure looks as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"455\" height=\"690\" data-attachment-id=\"1718\" data-permalink=\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/add-mass-actions-folder-constructe\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/add-mass-actions-folder-constructe.png?fit=455%2C690&amp;ssl=1\" data-orig-size=\"455,690\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"add-mass-actions-folder-constructe\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/add-mass-actions-folder-constructe.png?fit=198%2C300&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/add-mass-actions-folder-constructe.png?fit=455%2C690&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/add-mass-actions-folder-constructe.png?resize=455%2C690&#038;ssl=1\" alt=\"add mass actions folder Structure\" class=\"wp-image-1718\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/add-mass-actions-folder-constructe.png?w=455&amp;ssl=1 455w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/add-mass-actions-folder-constructe.png?resize=198%2C300&amp;ssl=1 198w\" sizes=\"auto, (max-width: 455px) 100vw, 455px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Custom display status<\/h2>\n\n\n\n<p>As you know we have displayed status in the admin grid but status only has value is 1 or 0, it is not clear. We will to show Enable or Disable text and change text box to select option in header filter.<\/p>\n\n\n\n<p>Replace the status column code in helloworld_posts_grid_block.xml according to the path: Magetop\/Helloworld\/view\/adminhtml\/layout\/helloworld_posts_grid_block.xml.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"482\" data-attachment-id=\"1713\" data-permalink=\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/old-status-columm-code\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/old-status-columm-code.png?fit=941%2C567&amp;ssl=1\" data-orig-size=\"941,567\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"old-status-columm-code\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/old-status-columm-code.png?fit=300%2C181&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/old-status-columm-code.png?fit=800%2C482&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/old-status-columm-code.png?resize=800%2C482&#038;ssl=1\" alt=\"old status column code\" class=\"wp-image-1713\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/old-status-columm-code.png?w=941&amp;ssl=1 941w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/old-status-columm-code.png?resize=300%2C181&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/old-status-columm-code.png?resize=768%2C463&amp;ssl=1 768w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>Replace by code:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&lt;block class=&quot;Magento\\Backend\\Block\\Widget\\Grid\\Column&quot; as=&quot;status&quot;&gt;\n                        &lt;arguments&gt;\n                            &lt;argument name=&quot;header&quot; xsi:type=&quot;string&quot; translate=&quot;true&quot;&gt;Status&lt;\/argument&gt;\n                            &lt;argument name=&quot;index&quot; xsi:type=&quot;string&quot;&gt;status&lt;\/argument&gt;\n                            &lt;argument name=&quot;type&quot; xsi:type=&quot;string&quot;&gt;options&lt;\/argument&gt;\n                            &lt;argument name=&quot;options&quot; xsi:type=&quot;options&quot; model=&quot;Magetop\\Helloworld\\Model\\System\\Config\\Status&quot;\/&gt;\n                        &lt;\/arguments&gt;\n                    &lt;\/block&gt;\n<\/pre><\/div>\n\n\n<p>Create Status.php in Magetop\/Helloworld\/Model\/System\/Config\/Status.php<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&lt;?php\nnamespace Magetop\\Helloworld\\Model\\System\\Config;\n\nuse Magento\\Framework\\Option\\ArrayInterface;\n\nclass Status implements ArrayInterface\n{\n    const ENABLED  = 1;\n    const DISABLED = 0;\n\n    \/**\n     * @return array\n     *\/\n    public function toOptionArray()\n    {\n        $options = &#x5B;\n            self::ENABLED =&gt; __('Enabled'),\n            self::DISABLED =&gt; __('Disabled'),\n        ];\n        return $options;\n    }\n\n}\n<\/pre><\/div>\n\n\n<p>You can see that the status column is showing Enable and Disable now.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1775\" height=\"707\" data-attachment-id=\"1714\" data-permalink=\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/change-status-column\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-column.png?fit=1775%2C707&amp;ssl=1\" data-orig-size=\"1775,707\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"change-status-column\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-column.png?fit=300%2C119&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-column.png?fit=800%2C319&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-column.png?fit=800%2C319&amp;ssl=1\" alt=\"change status column\" class=\"wp-image-1714\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-column.png?w=1775&amp;ssl=1 1775w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-column.png?resize=300%2C119&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-column.png?resize=1024%2C408&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-column.png?resize=768%2C306&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-column.png?resize=1536%2C612&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-column.png?w=1600&amp;ssl=1 1600w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Add Mass Actions<\/h2>\n\n\n\n<h4 class=\"wp-block-heading\">Add Mass Status<\/h4>\n\n\n\n<p>Change status Action help admin can change multi-status in Grid. you can select items in the checkbox and click change action.<\/p>\n\n\n\n<p>You need to create MassStatus.php in Magetop\/Helloworld\/Controller\/Adminhtml\/Posts\/MassStatus.php.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&lt;?php\nnamespace Magetop\\Helloworld\\Controller\\Adminhtml\\Posts;\n\nuse Magetop\\Helloworld\\Controller\\Adminhtml\\Posts;\nuse Magento\\Backend\\App\\Action\\Context;\nuse Magento\\Framework\\Registry;\nuse Magento\\Framework\\View\\Result\\PageFactory;\nuse Magetop\\Helloworld\\Model\\PostsFactory;\nuse Magetop\\Helloworld\\Model\\ResourceModel\\PostsFactory as resPostsFactory;\n\nclass MassStatus extends Posts\n{\n    protected $_resPostsFactory;\n\n    public function __construct(\n        Context $context,\n        Registry $coreRegistry,\n        PageFactory $resultPageFactory,\n        PostsFactory $postsFactory,\n        resPostsFactory $resPostsFactory\n    )\n    {\n        parent::__construct($context, $coreRegistry, $resultPageFactory, $postsFactory);\n        $this-&gt;_resPostsFactory = $resPostsFactory;\n    }\n\n    public function execute()\n    {\n        $status = $this-&gt;getRequest()-&gt;getParam('status', 0);\n        $postIds = $this-&gt;getRequest()-&gt;getParam('posts', array());\n        if (count($postIds)) {\n            $i = 0;\n            foreach ($postIds as $postId) {\n                try {\n                    $postId = (int)$postId;\n                    $model = $this-&gt;_postsFactory-&gt;create();\n                    $resModel = $this-&gt;_resPostsFactory-&gt;create();\n                    $model-&gt;setStatus($status)-&gt;setId($postId);\n                    $resModel-&gt;save($model);\n                    $i++;\n\n                } catch (\\Exception $e) {\n                    $this-&gt;messageManager-&gt;addErrorMessage($e-&gt;getMessage());\n                }\n            }\n            if ($i &gt; 0) {\n                $this-&gt;messageManager-&gt;addSuccessMessage(\n                    __('A total of %1 item(s) were deleted.', $i)\n                );\n            }\n        } else {\n            $this-&gt;messageManager-&gt;addError(\n                __('You can not item, Please check again')\n            );\n        }\n        $this-&gt;_redirect('*\/*\/index');\n    }\n}\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1789\" height=\"930\" data-attachment-id=\"1715\" data-permalink=\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/change-status-in-admin-grid\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-in-admin-grid.png?fit=1789%2C930&amp;ssl=1\" data-orig-size=\"1789,930\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"change-status-in-admin-grid\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-in-admin-grid.png?fit=300%2C156&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-in-admin-grid.png?fit=800%2C416&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-in-admin-grid.png?fit=800%2C416&amp;ssl=1\" alt=\"\" class=\"wp-image-1715\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-in-admin-grid.png?w=1789&amp;ssl=1 1789w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-in-admin-grid.png?resize=300%2C156&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-in-admin-grid.png?resize=1024%2C532&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-in-admin-grid.png?resize=768%2C399&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-in-admin-grid.png?resize=1536%2C798&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/change-status-in-admin-grid.png?w=1600&amp;ssl=1 1600w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>I changed the status of the post with id 4.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Add Mass Delete<\/h4>\n\n\n\n<p>Similar to Mass Status, you can also select items in the checkbox and click delete.<\/p>\n\n\n\n<p>You create Mass Delete in Magetop\/Helloworld\/Controller\/Adminhtml\/Posts\/MassDelete.php.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&lt;?php\nnamespace Magetop\\Helloworld\\Controller\\Adminhtml\\Posts;\n\nuse Magetop\\Helloworld\\Controller\\Adminhtml\\Posts;\nuse Magento\\Backend\\App\\Action\\Context;\nuse Magento\\Framework\\Registry;\nuse Magento\\Framework\\View\\Result\\PageFactory;\nuse Magetop\\Helloworld\\Model\\PostsFactory;\nuse Magetop\\Helloworld\\Model\\ResourceModel\\PostsFactory as resPostsFactory;\n\nclass MassDelete extends Posts\n{\n    protected $_resPostsFactory;\n\n    public function __construct(\n        Context $context,\n        Registry $coreRegistry,\n        PageFactory $resultPageFactory,\n        PostsFactory $postsFactory,\n        resPostsFactory $resPostsFactory\n    )\n    {\n        parent::__construct($context, $coreRegistry, $resultPageFactory, $postsFactory);\n        $this-&gt;_resPostsFactory = $resPostsFactory;\n    }\n\n    public function execute()\n    {\n        $postIds = $this-&gt;getRequest()-&gt;getParam('posts', array());\n        $model = $this-&gt;_postsFactory-&gt;create();\n        $resModel = $this-&gt;_resPostsFactory-&gt;create();\n        if(count($postIds))\n        {\n            $i = 0;\n            foreach ($postIds as $postId) {\n                try {\n                    $resModel-&gt;load($model,$postId);\n                    $resModel-&gt;delete($model);\n                    $i++;\n                } catch (\\Exception $e) {\n                    $this-&gt;messageManager-&gt;addErrorMessage($e-&gt;getMessage());\n                }\n            }\n            if ($i &gt; 0) {\n                $this-&gt;messageManager-&gt;addSuccessMessage(\n                    __('A total of %1 item(s) were deleted.', $i)\n                );\n            }\n        }\n        else\n        {\n            $this-&gt;messageManager-&gt;addErrorMessage(\n                __('You can not delete item(s), Please check again %1')\n            );\n        }\n        $this-&gt;_redirect('*\/*\/index');\n    }\n}\n\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1773\" height=\"826\" data-attachment-id=\"1717\" data-permalink=\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/delete-blog-in-admin-grid\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/delete-blog-in-admin-grid.png?fit=1773%2C826&amp;ssl=1\" data-orig-size=\"1773,826\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"delete-blog-in-admin-grid\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/delete-blog-in-admin-grid.png?fit=300%2C140&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/delete-blog-in-admin-grid.png?fit=800%2C373&amp;ssl=1\" src=\"https:\/\/i1.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/delete-blog-in-admin-grid.png?fit=800%2C373&amp;ssl=1\" alt=\"delete blog in admin grid\" class=\"wp-image-1717\" srcset=\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/delete-blog-in-admin-grid.png?w=1773&amp;ssl=1 1773w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/delete-blog-in-admin-grid.png?resize=300%2C140&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/delete-blog-in-admin-grid.png?resize=1024%2C477&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/delete-blog-in-admin-grid.png?resize=768%2C358&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/delete-blog-in-admin-grid.png?resize=1536%2C716&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/delete-blog-in-admin-grid.png?w=1600&amp;ssl=1 1600w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>You can see I deleted the post with id 4.<\/p>\n\n\n\n<p>I hope through this series you can create your own complete module. Good luck!<\/p>\n\n\n\n<p>In addition to How To Add Mass Actions In Magento 2, you can read the articles <a href=\"https:\/\/www.magetop.com\/blog\/admin-grid-crud-in-magento\/\" target=\"_blank\" rel=\"noreferrer noopener\">Admin Grid CRUD In Magento 2<\/a>.<\/p>\n\n\n\n<p>Follow us for the more helpful article!<\/p>\n\n\n\n<p>We hope this is a useful series for you.<\/p>\n\n\n\n<p>Thank you for reading!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the previous lesson, I showed you How To Custom Admin Grid In Magento 2. Following that lesson, I will show you How To Add Mass Actions In Magento 2.<br \/>\nThis is a series on Magento 2 Extension Tutorial. The lessons are related to each other so you should read the previous lessons to be able to do this lesson.<\/p>\n","protected":false},"author":106,"featured_media":1753,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[360,362,359,361,107],"class_list":["post-1709","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento-2-tutorials","tag-add-mass-actions-in-magento-2","tag-create-mass-action-in-magento-2","tag-how-to-add-mass-actions-in-magento-2","tag-magento-2-add-mass-actions","tag-magento-2-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Add Mass Actions In Magento 2 - Magetop Blog<\/title>\n<meta name=\"description\" content=\"Following that lesson, I will show you How To Add Mass Actions In Magento 2. This is a series on Magento 2 Extension Tutorial. The lessons are related to...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Add Mass Actions In Magento 2 - Magetop Blog\" \/>\n<meta property=\"og:description\" content=\"Following that lesson, I will show you How To Add Mass Actions In Magento 2. This is a series on Magento 2 Extension Tutorial. The lessons are related to...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/\" \/>\n<meta property=\"og:site_name\" content=\"Magetop Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/MagetopStore\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-02T08:51:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-22T02:56:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i2.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Add-Mass-Action.png?fit=750%2C445&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"750\" \/>\n\t<meta property=\"og:image:height\" content=\"445\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Aaron LX\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@MagetopStore\" \/>\n<meta name=\"twitter:site\" content=\"@MagetopStore\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Aaron LX\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/\"},\"author\":{\"name\":\"Aaron LX\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7\"},\"headline\":\"How To Add Mass Actions In Magento 2\",\"datePublished\":\"2020-04-02T08:51:46+00:00\",\"dateModified\":\"2021-07-22T02:56:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/\"},\"wordCount\":314,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Add-Mass-Action.png?fit=750%2C445&ssl=1\",\"keywords\":[\"Add Mass Actions In Magento 2\",\"create mass action in magento 2\",\"How To Add Mass Actions In Magento 2\",\"Magento 2 add mass actions\",\"magento 2 tutorials\"],\"articleSection\":[\"Magento 2 Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/\",\"url\":\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/\",\"name\":\"How To Add Mass Actions In Magento 2 - Magetop Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Add-Mass-Action.png?fit=750%2C445&ssl=1\",\"datePublished\":\"2020-04-02T08:51:46+00:00\",\"dateModified\":\"2021-07-22T02:56:05+00:00\",\"description\":\"Following that lesson, I will show you How To Add Mass Actions In Magento 2. This is a series on Magento 2 Extension Tutorial. The lessons are related to...\",\"breadcrumb\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Add-Mass-Action.png?fit=750%2C445&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Add-Mass-Action.png?fit=750%2C445&ssl=1\",\"width\":750,\"height\":445,\"caption\":\"Magento 2 How To Add Mass Action\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.magetop.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Add Mass Actions In Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#website\",\"url\":\"https:\/\/www.magetop.com\/blog\/\",\"name\":\"Magetop Blog\",\"description\":\"Exploring Magento Tips, Tricks, and Trends\",\"publisher\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.magetop.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#organization\",\"name\":\"Magetop.com\",\"url\":\"https:\/\/www.magetop.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1\",\"width\":475,\"height\":475,\"caption\":\"Magetop.com\"},\"image\":{\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/MagetopStore\",\"https:\/\/x.com\/MagetopStore\",\"https:\/\/www.linkedin.com\/company\/magetop\",\"https:\/\/www.pinterest.com\/magetop\",\"https:\/\/www.youtube.com\/channel\/UCXoiJsz88OfPmwa8QpUkwOA\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7\",\"name\":\"Aaron LX\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1\",\"caption\":\"Aaron LX\"},\"description\":\"Aaron is a passionate writer, crazy about shopping, eCommerce and trends. Besides his outstanding research skills and a positive mind, Aaron eagerly shares his experience with the readers.\",\"url\":\"https:\/\/www.magetop.com\/blog\/author\/aaron-lx\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Add Mass Actions In Magento 2 - Magetop Blog","description":"Following that lesson, I will show you How To Add Mass Actions In Magento 2. This is a series on Magento 2 Extension Tutorial. The lessons are related to...","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/","og_locale":"en_US","og_type":"article","og_title":"How To Add Mass Actions In Magento 2 - Magetop Blog","og_description":"Following that lesson, I will show you How To Add Mass Actions In Magento 2. This is a series on Magento 2 Extension Tutorial. The lessons are related to...","og_url":"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/","og_site_name":"Magetop Blog","article_publisher":"https:\/\/www.facebook.com\/MagetopStore","article_published_time":"2020-04-02T08:51:46+00:00","article_modified_time":"2021-07-22T02:56:05+00:00","og_image":[{"width":750,"height":445,"url":"https:\/\/i2.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Add-Mass-Action.png?fit=750%2C445&ssl=1","type":"image\/png"}],"author":"Aaron LX","twitter_card":"summary_large_image","twitter_creator":"@MagetopStore","twitter_site":"@MagetopStore","twitter_misc":{"Written by":"Aaron LX","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#article","isPartOf":{"@id":"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/"},"author":{"name":"Aaron LX","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7"},"headline":"How To Add Mass Actions In Magento 2","datePublished":"2020-04-02T08:51:46+00:00","dateModified":"2021-07-22T02:56:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/"},"wordCount":314,"commentCount":0,"publisher":{"@id":"https:\/\/www.magetop.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Add-Mass-Action.png?fit=750%2C445&ssl=1","keywords":["Add Mass Actions In Magento 2","create mass action in magento 2","How To Add Mass Actions In Magento 2","Magento 2 add mass actions","magento 2 tutorials"],"articleSection":["Magento 2 Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/","url":"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/","name":"How To Add Mass Actions In Magento 2 - Magetop Blog","isPartOf":{"@id":"https:\/\/www.magetop.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#primaryimage"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Add-Mass-Action.png?fit=750%2C445&ssl=1","datePublished":"2020-04-02T08:51:46+00:00","dateModified":"2021-07-22T02:56:05+00:00","description":"Following that lesson, I will show you How To Add Mass Actions In Magento 2. This is a series on Magento 2 Extension Tutorial. The lessons are related to...","breadcrumb":{"@id":"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#primaryimage","url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Add-Mass-Action.png?fit=750%2C445&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Add-Mass-Action.png?fit=750%2C445&ssl=1","width":750,"height":445,"caption":"Magento 2 How To Add Mass Action"},{"@type":"BreadcrumbList","@id":"https:\/\/www.magetop.com\/blog\/how-to-add-mass-actions-in-magento\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.magetop.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How To Add Mass Actions In Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/www.magetop.com\/blog\/#website","url":"https:\/\/www.magetop.com\/blog\/","name":"Magetop Blog","description":"Exploring Magento Tips, Tricks, and Trends","publisher":{"@id":"https:\/\/www.magetop.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.magetop.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.magetop.com\/blog\/#organization","name":"Magetop.com","url":"https:\/\/www.magetop.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2021\/11\/logo.png?fit=475%2C475&ssl=1","width":475,"height":475,"caption":"Magetop.com"},"image":{"@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/MagetopStore","https:\/\/x.com\/MagetopStore","https:\/\/www.linkedin.com\/company\/magetop","https:\/\/www.pinterest.com\/magetop","https:\/\/www.youtube.com\/channel\/UCXoiJsz88OfPmwa8QpUkwOA"]},{"@type":"Person","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/b8770690a02cc53a273d6b7205229ff7","name":"Aaron LX","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.magetop.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2025\/11\/475315059_122137709240563546_260104055231757176_n.jpg?fit=96%2C96&#038;ssl=1","caption":"Aaron LX"},"description":"Aaron is a passionate writer, crazy about shopping, eCommerce and trends. Besides his outstanding research skills and a positive mind, Aaron eagerly shares his experience with the readers.","url":"https:\/\/www.magetop.com\/blog\/author\/aaron-lx\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Add-Mass-Action.png?fit=750%2C445&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/paOdw5-rz","jetpack-related-posts":[{"id":1402,"url":"https:\/\/www.magetop.com\/blog\/magento-2-extension-tutorial\/","url_meta":{"origin":1709,"position":0},"title":"Magento 2 Extension Tutorial","author":"Aaron LX","date":"February 15, 2020","format":false,"excerpt":"Magento 2 is an open-source platform that allows you can create a module for yourself. And those modules can extend functions for the Magento store. And in this article, I will introduce to Magento 2 Extension Tutorial.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Magetop Extension Tutorial","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/02\/Extension-Tutorial.jpg?fit=750%2C455&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/02\/Extension-Tutorial.jpg?fit=750%2C455&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/02\/Extension-Tutorial.jpg?fit=750%2C455&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/02\/Extension-Tutorial.jpg?fit=750%2C455&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1696,"url":"https:\/\/www.magetop.com\/blog\/how-to-custom-admin-grid-in-magento\/","url_meta":{"origin":1709,"position":1},"title":"How To Custom Admin Grid In Magento 2","author":"Aaron LX","date":"April 2, 2020","format":false,"excerpt":"In the previous lesson, I introduced How To Create Admin Grid In Magento 2. You should read that lesson to be able to do How To Custom Admin Grid In Magento 2 lesson.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Magento 2 How To Custom Admin Grid","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Custom-Admin-Grid.png?fit=750%2C445&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Custom-Admin-Grid.png?fit=750%2C445&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Custom-Admin-Grid.png?fit=750%2C445&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Custom-Admin-Grid.png?fit=750%2C445&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1651,"url":"https:\/\/www.magetop.com\/blog\/how-to-use-event-in-magento-2\/","url_meta":{"origin":1709,"position":2},"title":"How To Use Event In Magento 2","author":"Aaron LX","date":"April 1, 2020","format":false,"excerpt":"In the previous article, we learned How To Use Helper And Setting In Magento 2. Following the previous tutorial, we will learn about How To Use Event in Magento 2. This is a very basic tutorial but it is very important.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Magento 2 How To Use Event","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Event.png?fit=750%2C445&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Event.png?fit=750%2C445&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Event.png?fit=750%2C445&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Event.png?fit=750%2C445&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1722,"url":"https:\/\/www.magetop.com\/blog\/admin-grid-crud-in-magento\/","url_meta":{"origin":1709,"position":3},"title":"Admin Grid CRUD In Magento 2","author":"Aaron LX","date":"April 2, 2020","format":false,"excerpt":"In the previous article, I introduced How To Add Mass Actions In Magento 2. In this article, we will learn about Admin Grid CRUD In Magento 2. This is a series on Magento 2 Extension Tutorial. The lessons are related to each other so you should read step by step.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Magento 2 Admin Grid CRUD","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-Admin-Grid-CRUD.png?fit=750%2C445&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-Admin-Grid-CRUD.png?fit=750%2C445&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-Admin-Grid-CRUD.png?fit=750%2C445&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-Admin-Grid-CRUD.png?fit=750%2C445&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1664,"url":"https:\/\/www.magetop.com\/blog\/how-to-get-items-to-storefront-magento\/","url_meta":{"origin":1709,"position":4},"title":"How To Get Items To Storefront In Magento 2","author":"Aaron LX","date":"April 1, 2020","format":false,"excerpt":"In the previous lesson, we learned together How To Use Model In Magento 2. Continuing that lesson, I will introduce How To Get Items To Storefront In Magento 2. You should read the Magento 2 Extension Tutorial step by step to be able to understand this lesson.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Magento 2 How To Get Items To Storefront","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Get-Items-To-Storefront.png?fit=813%2C450&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Get-Items-To-Storefront.png?fit=813%2C450&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Get-Items-To-Storefront.png?fit=813%2C450&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Get-Items-To-Storefront.png?fit=813%2C450&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":1640,"url":"https:\/\/www.magetop.com\/blog\/how-to-use-model-in-magento-2\/","url_meta":{"origin":1709,"position":5},"title":"How To Use Model In Magento 2","author":"Aaron LX","date":"April 1, 2020","format":false,"excerpt":"In this tutorial, we will learn about How To Use Model in Magento 2. This is a basic tutorial followed by How To Create Database Table in Magento 2. You should see the previous article to understand this lesson.","rel":"","context":"In &quot;Magento 2 Tutorials&quot;","block_context":{"text":"Magento 2 Tutorials","link":"https:\/\/www.magetop.com\/blog\/magento-2-tutorials\/"},"img":{"alt_text":"Magento 2 How To Use Model","src":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Model.png?fit=750%2C445&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Model.png?fit=750%2C445&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Model.png?fit=750%2C445&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.magetop.com\/blog\/wp-content\/uploads\/2020\/04\/Magento-2-How-To-Use-Model.png?fit=750%2C445&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/1709","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/users\/106"}],"replies":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/comments?post=1709"}],"version-history":[{"count":3,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/1709\/revisions"}],"predecessor-version":[{"id":1765,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/posts\/1709\/revisions\/1765"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/media\/1753"}],"wp:attachment":[{"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/media?parent=1709"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/categories?post=1709"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.magetop.com\/blog\/wp-json\/wp\/v2\/tags?post=1709"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}