registry = $registry; $this->isWebsiteInMultiSourceMode = $isWebsiteInMultiSourceMode; } /** * @inheritdoc */ protected function _prepareLayout() { parent::_prepareLayout(); $order = $this->registry->registry('current_order'); $websiteId = (int)$order->getStore()->getWebsiteId(); if ($this->isWebsiteInMultiSourceMode->execute($websiteId)) { $this->buttonList->update( 'order_ship', 'onclick', 'setLocation(\'' . $this->getSourceSelectionUrl() . '\')' ); } return $this; } /** * Source Selection URL getter * * @return string */ public function getSourceSelectionUrl() { return $this->getUrl( 'inventoryshipping/SourceSelection/index', [ 'order_id' => $this->getRequest()->getParam('order_id') ] ); } }