In the magento Sales > Orders view where it lists all orders. I am trying to prevent the redirection when clicking on the order row (admin/sales_order/view/order_id/{orderID})
I would like to keep the action when the "view" link is clicked but prevent it if clicked anywhere else.

I process orders from the list view and copying information is a pain requiring me to hit escape every time I try (and sometimes redirects anyway)


What's causing this is you have <td>s with a link in their title.
You need to modify app\code\core\Mage\Adminhtml\Block\Sales\Order\Grid.php and comment the inside of the following function:

public function getRowUrl($row)
    //if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/view')) {
        //return $this->getUrl('*/sales_order/view', array('order_id' => $row->getId()));
    return false;

This should remove the link from the rows and still let you click the "view" link.

| improve this answer | |
  • Thank you for your reply! Idk whats causing it but it's been doing that as long as I can remember (2-3 years)... I will check to see if this works and let you know... – Brennan Casler Dec 14 '16 at 17:25
  • It has that without the "//" I tried adding the "//" but it didn't seem to have any effect – Brennan Casler Dec 14 '16 at 19:13
  • What I meant was: "have your function be like the one below". Or comment the return false; too, see if that helps. – Julien Lachal Dec 15 '16 at 8:18
  • This may seem like a dumb question but do I need to reindex after making the change? – Brennan Casler Dec 22 '16 at 20:35
  • Nah this has nothing to do with indexes you're fine. – Julien Lachal Dec 23 '16 at 7:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.