I'm trying to change the functionality of Ship button when you choose an order.

The only thing that I have found so far is this file under /vendor/magento/module-sales/Block/Adminhtml/Order/View.php:

I see this part where the button has an onclick method:

                    'label' => __('Ship'),
                    'onclick' => 'setLocation(\'' . $this->getShipUrl() . '\')',
                    'class' => 'ship'

and then this is the URL

public function getShipUrl()
        return $this->getUrl('adminhtml/order_shipment/start');

I don't know if that url is a controller, I have not found a route with that id nor that exactly path. Or maybe it's an api? This is the url that is shown on backend when I inspect


Hope someone can give me a hint!


  • what exactly are you trying to achieve here?
    – fmsthird
    Nov 26 '20 at 2:54
  • I wan't to change the status of the order when Ship button is clicked, to keep it in Processing or delivered Nov 26 '20 at 15:08
  • ah then maybe you can only do that using Observer, it's a backend process. try to look for events like sales_order_shipment_save_after
    – fmsthird
    Nov 26 '20 at 22:12

Url is correct. The related module is Magento_Shipping. Check the following class:


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.