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

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

                    Circuit construction for execution of conditional statements using least significant bitHow are two different registers being used as “control”?How exactly is the stated composite state of the two registers being produced using the $R_zz$ controlled rotations?Efficiently performing controlled rotations in HHLWould this quantum algorithm implementation work?How to prepare a superposed states of odd integers from $1$ to $sqrtN$?Why is this implementation of the order finding algorithm not working?Circuit construction for Hamiltonian simulationHow can I invert the least significant bit of a certain term of a superposed state?Implementing an oracleImplementing a controlled sum operation

                    Magento 2 “No Payment Methods” in Admin New OrderHow to integrate Paypal Express Checkout with the Magento APIMagento 1.5 - Sales > Order > edit order and shipping methods disappearAuto Invoice Check/Money Order Payment methodAdd more simple payment methods?Shipping methods not showingWhat should I do to change payment methods if changing the configuration has no effects?1.9 - No Payment Methods showing upMy Payment Methods not Showing for downloadable/virtual product when checkout?Magento2 API to access internal payment methodHow to call an existing payment methods in the registration form?