Note that there are some explanatory texts on larger screens.

plurals
  1. POmagento admin redirecting back to main page of module after massaction
    primarykey
    data
    text
    <p>After adding massAction to a new Magento Admin module, I get redirected to the main page for that module instead of where I was last.</p> <p>As an example: I have a month dropdown menu, so I go select "November", then I select "Page 3" from the pagination. Then when I select and run an action against one or more items, I get redirected back to the current month, page 1.</p> <p>I added massAction from this post: <a href="http://inchoo.net/ecommerce/magento/how-to-add-massactions-to-magentos-grid/" rel="nofollow">http://inchoo.net/ecommerce/magento/how-to-add-massactions-to-magentos-grid/</a> Here is what I ended up with:</p> <pre><code>protected function _prepareMassaction() { parent::_prepareMassaction(); $this-&gt;setMassactionIdField('entity_id'); $this-&gt;getMassactionBlock()-&gt;setFormFieldName('value_id'); $this-&gt;getMassactionBlock()-&gt;addItem('deactivate', array( 'label' =&gt; Mage::helper('renewals')-&gt;__('Deactivate'), 'url' =&gt; $this-&gt;getUrl('*/*/massDeactivate'), 'confirm' =&gt; Mage::helper('renewals')-&gt;__('Are you sure you want to deactivate these accounts?'), )); return $this; } </code></pre> <p>and my controller data:</p> <pre><code>public function massDeactivateAction() { $value_ids = $this-&gt;getRequest()-&gt;getParam('value_id'); $helper = Mage::helper('helper/data'); foreach ($value_ids as $value_id) { $helper-&gt;deactivateValue($value_id); } $this-&gt;_redirect('*/*/index'); return; } </code></pre> <p>Any ideas what would be causing this to not stay on the current page I'm on? It's working on the Manage Products page, but interesting thing there, when I click on a page, the page number doesn't go into the URL, so it appears it's being submitted via POST or something on that particular page while mine is using GET. I'm not sure if that has anything to do with the problem or not.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload