Magento 2.3: Mass Action For Status Not WorkingMass action in widgetsAdding new custom mass order status actionProductController for Mass ActionMass Action in Order GridMass Action not sending all dataValidate mass action columnMass action delete not working on Magento 2.1.9Mass Action: Bulk invoice - Shipping charges issueAdmin Grid Mass Action delete not working for custom module for Magento 2.2.4Magento 2: Mass Delete PHP code not Working

Can the Help action be used to give advantage to a specific ally's attack (rather than just the next ally who attacks the target)?

Infinitely many hats

Is it ok to put a subplot to a story that is never meant to contribute to the development of the main plot?

What is the difference between nullifying your vote and not going to vote at all?

What does "Marchentalender" on the front of a postcard mean?

What caused the tendency for conservatives to not support climate change reform?

shutdown at specific date

Why does the 6502 have the BIT instruction?

The qvolume of an integer

Is a post-climate apocolypse city in which many or most insects have disappeared realistic?

What is the 中 in ダウンロード中?

What does the behaviour of water on the skin of an aircraft in flight tell us?

Is this light switch installation safe and legal?

Different PCB color ( is it different material? )

Is it possible to change original filename of an exe?

What's the connection between "kicking a pigeon" and "how a bill becomes a law"?

Mother abusing my finances

Where can I find the list of all tendons in the human body?

File globbing pattern, !(*example), behaves differently in bash script than it does in bash shell

How can I find where certain bash function is defined?

How were these pictures of spacecraft wind tunnel testing taken?

Is CD audio quality good enough for the final delivery of music?

Preserving culinary oils

What are the problems in teaching guitar via Skype?



Magento 2.3: Mass Action For Status Not Working


Mass action in widgetsAdding new custom mass order status actionProductController for Mass ActionMass Action in Order GridMass Action not sending all dataValidate mass action columnMass action delete not working on Magento 2.1.9Mass Action: Bulk invoice - Shipping charges issueAdmin Grid Mass Action delete not working for custom module for Magento 2.2.4Magento 2: Mass Delete PHP code not Working






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm very new to Magento 2.3, i created a Mass Action for Status Change, when i open action dropdown and click Change status a tree menu should open with 2 options, but when i click on Change status page just refresh, i write this code in /EC/Downloads/view/adminhtml/ui_component/ec_downloads_items.xml



 <listingToolbar name="listing_top">
<settings>
<sticky>true</sticky>
</settings>
<paging name="listing_paging"/>
<filters name="listing_filters"/>

<massaction name="listing_massaction">

<action name="delete">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">delete</item>
<item name="label" xsi:type="string" translate="true">Delete</item>
<item name="url" xsi:type="url" path="*/items/MassDelete"/>
<item name="confirm" xsi:type="array">
<item name="title" xsi:type="string" translate="true">Delete</item>
<item name="message" xsi:type="string" translate="true">Do you want to delete selected row record?</item>
</item>
</item>
</argument>
</action>

<action name="status">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">status</item>
<item name="label" xsi:type="string" translate="true">Change status</item>
</item>
</argument>
<argument name="actions" xsi:type="array">
<item name="0" xsi:type="array">
<item name="type" xsi:type="string">enable</item>
<item name="label" xsi:type="string" translate="true">Enable</item>
<item name="url" xsi:type="url" path="*/items/MassStatus">
<param name="status">1</param>
</item>
</item>
<item name="1" xsi:type="array">
<item name="type" xsi:type="string">disable</item>
<item name="label" xsi:type="string" translate="true">Disable</item>
<item name="url" xsi:type="url" path="*/items/MassStatus">
<param name="status">2</param>
</item>
</item>
</argument>
</action>

</massaction>
</listingToolbar>


and this code in /EC/Downloads/Controller/Adminhtml/Items/MassStatus.php



<?php
namespace ECDownloadsControllerAdminhtmlItems;

use MagentoBackendAppActionContext;
use MagentoUiComponentMassActionFilter;
use ECDownloadsModelResourceModelItemsCollectionFactory; // Define your collection here
use MagentoFrameworkControllerResultFactory;

/**
* Class MassDisable
*/
class MassStatus extends MagentoBackendAppAction
Exception
*/
public function execute()

echo 'Hello';exit;
$statusValue = $this->getRequest()->getParam('status');
$collection = $this->filter->getCollection($this->collectionFactory->create());

foreach ($collection as $item)
$item->setStatus($statusValue);
$item->save();


$this->messageManager->addSuccess(__('A total of %1 record(s) have been modified.', $collection->getSize()));

/** @var MagentoBackendModelViewResultRedirect $resultRedirect */
$resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
return $resultRedirect->setPath('*/*/');




code in /EC/Downloads/Model/ResourceModel/Items.php



<?php

namespace ECDownloadsModelResourceModel;
/**
* Class Items
* @package ECDownloadsModelResourceModel
*/
class Items extends MagentoFrameworkModelResourceModelDbAbstractDb

/**
*
*/
protected function _construct()

$this->_init('downloads', 'downloads_id');











share|improve this question




























    0















    I'm very new to Magento 2.3, i created a Mass Action for Status Change, when i open action dropdown and click Change status a tree menu should open with 2 options, but when i click on Change status page just refresh, i write this code in /EC/Downloads/view/adminhtml/ui_component/ec_downloads_items.xml



     <listingToolbar name="listing_top">
    <settings>
    <sticky>true</sticky>
    </settings>
    <paging name="listing_paging"/>
    <filters name="listing_filters"/>

    <massaction name="listing_massaction">

    <action name="delete">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="type" xsi:type="string">delete</item>
    <item name="label" xsi:type="string" translate="true">Delete</item>
    <item name="url" xsi:type="url" path="*/items/MassDelete"/>
    <item name="confirm" xsi:type="array">
    <item name="title" xsi:type="string" translate="true">Delete</item>
    <item name="message" xsi:type="string" translate="true">Do you want to delete selected row record?</item>
    </item>
    </item>
    </argument>
    </action>

    <action name="status">
    <argument name="data" xsi:type="array">
    <item name="config" xsi:type="array">
    <item name="type" xsi:type="string">status</item>
    <item name="label" xsi:type="string" translate="true">Change status</item>
    </item>
    </argument>
    <argument name="actions" xsi:type="array">
    <item name="0" xsi:type="array">
    <item name="type" xsi:type="string">enable</item>
    <item name="label" xsi:type="string" translate="true">Enable</item>
    <item name="url" xsi:type="url" path="*/items/MassStatus">
    <param name="status">1</param>
    </item>
    </item>
    <item name="1" xsi:type="array">
    <item name="type" xsi:type="string">disable</item>
    <item name="label" xsi:type="string" translate="true">Disable</item>
    <item name="url" xsi:type="url" path="*/items/MassStatus">
    <param name="status">2</param>
    </item>
    </item>
    </argument>
    </action>

    </massaction>
    </listingToolbar>


    and this code in /EC/Downloads/Controller/Adminhtml/Items/MassStatus.php



    <?php
    namespace ECDownloadsControllerAdminhtmlItems;

    use MagentoBackendAppActionContext;
    use MagentoUiComponentMassActionFilter;
    use ECDownloadsModelResourceModelItemsCollectionFactory; // Define your collection here
    use MagentoFrameworkControllerResultFactory;

    /**
    * Class MassDisable
    */
    class MassStatus extends MagentoBackendAppAction
    Exception
    */
    public function execute()

    echo 'Hello';exit;
    $statusValue = $this->getRequest()->getParam('status');
    $collection = $this->filter->getCollection($this->collectionFactory->create());

    foreach ($collection as $item)
    $item->setStatus($statusValue);
    $item->save();


    $this->messageManager->addSuccess(__('A total of %1 record(s) have been modified.', $collection->getSize()));

    /** @var MagentoBackendModelViewResultRedirect $resultRedirect */
    $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
    return $resultRedirect->setPath('*/*/');




    code in /EC/Downloads/Model/ResourceModel/Items.php



    <?php

    namespace ECDownloadsModelResourceModel;
    /**
    * Class Items
    * @package ECDownloadsModelResourceModel
    */
    class Items extends MagentoFrameworkModelResourceModelDbAbstractDb

    /**
    *
    */
    protected function _construct()

    $this->_init('downloads', 'downloads_id');











    share|improve this question
























      0












      0








      0








      I'm very new to Magento 2.3, i created a Mass Action for Status Change, when i open action dropdown and click Change status a tree menu should open with 2 options, but when i click on Change status page just refresh, i write this code in /EC/Downloads/view/adminhtml/ui_component/ec_downloads_items.xml



       <listingToolbar name="listing_top">
      <settings>
      <sticky>true</sticky>
      </settings>
      <paging name="listing_paging"/>
      <filters name="listing_filters"/>

      <massaction name="listing_massaction">

      <action name="delete">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="type" xsi:type="string">delete</item>
      <item name="label" xsi:type="string" translate="true">Delete</item>
      <item name="url" xsi:type="url" path="*/items/MassDelete"/>
      <item name="confirm" xsi:type="array">
      <item name="title" xsi:type="string" translate="true">Delete</item>
      <item name="message" xsi:type="string" translate="true">Do you want to delete selected row record?</item>
      </item>
      </item>
      </argument>
      </action>

      <action name="status">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="type" xsi:type="string">status</item>
      <item name="label" xsi:type="string" translate="true">Change status</item>
      </item>
      </argument>
      <argument name="actions" xsi:type="array">
      <item name="0" xsi:type="array">
      <item name="type" xsi:type="string">enable</item>
      <item name="label" xsi:type="string" translate="true">Enable</item>
      <item name="url" xsi:type="url" path="*/items/MassStatus">
      <param name="status">1</param>
      </item>
      </item>
      <item name="1" xsi:type="array">
      <item name="type" xsi:type="string">disable</item>
      <item name="label" xsi:type="string" translate="true">Disable</item>
      <item name="url" xsi:type="url" path="*/items/MassStatus">
      <param name="status">2</param>
      </item>
      </item>
      </argument>
      </action>

      </massaction>
      </listingToolbar>


      and this code in /EC/Downloads/Controller/Adminhtml/Items/MassStatus.php



      <?php
      namespace ECDownloadsControllerAdminhtmlItems;

      use MagentoBackendAppActionContext;
      use MagentoUiComponentMassActionFilter;
      use ECDownloadsModelResourceModelItemsCollectionFactory; // Define your collection here
      use MagentoFrameworkControllerResultFactory;

      /**
      * Class MassDisable
      */
      class MassStatus extends MagentoBackendAppAction
      Exception
      */
      public function execute()

      echo 'Hello';exit;
      $statusValue = $this->getRequest()->getParam('status');
      $collection = $this->filter->getCollection($this->collectionFactory->create());

      foreach ($collection as $item)
      $item->setStatus($statusValue);
      $item->save();


      $this->messageManager->addSuccess(__('A total of %1 record(s) have been modified.', $collection->getSize()));

      /** @var MagentoBackendModelViewResultRedirect $resultRedirect */
      $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
      return $resultRedirect->setPath('*/*/');




      code in /EC/Downloads/Model/ResourceModel/Items.php



      <?php

      namespace ECDownloadsModelResourceModel;
      /**
      * Class Items
      * @package ECDownloadsModelResourceModel
      */
      class Items extends MagentoFrameworkModelResourceModelDbAbstractDb

      /**
      *
      */
      protected function _construct()

      $this->_init('downloads', 'downloads_id');











      share|improve this question














      I'm very new to Magento 2.3, i created a Mass Action for Status Change, when i open action dropdown and click Change status a tree menu should open with 2 options, but when i click on Change status page just refresh, i write this code in /EC/Downloads/view/adminhtml/ui_component/ec_downloads_items.xml



       <listingToolbar name="listing_top">
      <settings>
      <sticky>true</sticky>
      </settings>
      <paging name="listing_paging"/>
      <filters name="listing_filters"/>

      <massaction name="listing_massaction">

      <action name="delete">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="type" xsi:type="string">delete</item>
      <item name="label" xsi:type="string" translate="true">Delete</item>
      <item name="url" xsi:type="url" path="*/items/MassDelete"/>
      <item name="confirm" xsi:type="array">
      <item name="title" xsi:type="string" translate="true">Delete</item>
      <item name="message" xsi:type="string" translate="true">Do you want to delete selected row record?</item>
      </item>
      </item>
      </argument>
      </action>

      <action name="status">
      <argument name="data" xsi:type="array">
      <item name="config" xsi:type="array">
      <item name="type" xsi:type="string">status</item>
      <item name="label" xsi:type="string" translate="true">Change status</item>
      </item>
      </argument>
      <argument name="actions" xsi:type="array">
      <item name="0" xsi:type="array">
      <item name="type" xsi:type="string">enable</item>
      <item name="label" xsi:type="string" translate="true">Enable</item>
      <item name="url" xsi:type="url" path="*/items/MassStatus">
      <param name="status">1</param>
      </item>
      </item>
      <item name="1" xsi:type="array">
      <item name="type" xsi:type="string">disable</item>
      <item name="label" xsi:type="string" translate="true">Disable</item>
      <item name="url" xsi:type="url" path="*/items/MassStatus">
      <param name="status">2</param>
      </item>
      </item>
      </argument>
      </action>

      </massaction>
      </listingToolbar>


      and this code in /EC/Downloads/Controller/Adminhtml/Items/MassStatus.php



      <?php
      namespace ECDownloadsControllerAdminhtmlItems;

      use MagentoBackendAppActionContext;
      use MagentoUiComponentMassActionFilter;
      use ECDownloadsModelResourceModelItemsCollectionFactory; // Define your collection here
      use MagentoFrameworkControllerResultFactory;

      /**
      * Class MassDisable
      */
      class MassStatus extends MagentoBackendAppAction
      Exception
      */
      public function execute()

      echo 'Hello';exit;
      $statusValue = $this->getRequest()->getParam('status');
      $collection = $this->filter->getCollection($this->collectionFactory->create());

      foreach ($collection as $item)
      $item->setStatus($statusValue);
      $item->save();


      $this->messageManager->addSuccess(__('A total of %1 record(s) have been modified.', $collection->getSize()));

      /** @var MagentoBackendModelViewResultRedirect $resultRedirect */
      $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);
      return $resultRedirect->setPath('*/*/');




      code in /EC/Downloads/Model/ResourceModel/Items.php



      <?php

      namespace ECDownloadsModelResourceModel;
      /**
      * Class Items
      * @package ECDownloadsModelResourceModel
      */
      class Items extends MagentoFrameworkModelResourceModelDbAbstractDb

      /**
      *
      */
      protected function _construct()

      $this->_init('downloads', 'downloads_id');








      magento2.3 xml controllers massaction status






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 22 at 12:08









      Saif ZakirSaif Zakir

      387




      387




















          1 Answer
          1






          active

          oldest

          votes


















          0














          I forgot to add the component in <massaction> tag:



          <massaction name="listing_massaction" component="Magento_Ui/js/grid/tree-massactions">
          .........
          </massaction>





          share|improve this answer























            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "479"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f275677%2fmagento-2-3-mass-action-for-status-not-working%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I forgot to add the component in <massaction> tag:



            <massaction name="listing_massaction" component="Magento_Ui/js/grid/tree-massactions">
            .........
            </massaction>





            share|improve this answer



























              0














              I forgot to add the component in <massaction> tag:



              <massaction name="listing_massaction" component="Magento_Ui/js/grid/tree-massactions">
              .........
              </massaction>





              share|improve this answer

























                0












                0








                0







                I forgot to add the component in <massaction> tag:



                <massaction name="listing_massaction" component="Magento_Ui/js/grid/tree-massactions">
                .........
                </massaction>





                share|improve this answer













                I forgot to add the component in <massaction> tag:



                <massaction name="listing_massaction" component="Magento_Ui/js/grid/tree-massactions">
                .........
                </massaction>






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered May 24 at 9:19









                Saif ZakirSaif Zakir

                387




                387



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f275677%2fmagento-2-3-mass-action-for-status-not-working%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                    Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                    Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form