Hot answers tagged

1

You can do this by plugin. Create this class: <?php namespace NameSpace\ModuleName\Plugin\Sales\Block\Adminhtml\Order; use Magento\Sales\Block\Adminhtml\Order\View as OrderView; use Magento\Framework\UrlInterface; use Magento\Framework\AuthorizationInterface; class View { /** @var \Magento\Framework\UrlInterface */ protected $_urlBuilder; /*...


1

I agree with the comments, extend and reuse the core code as much as possible. You either are having issues with how you form the cancel link or it is something in the controller, the code below works fine. app/code/StackExchange/CancelOrder/Controller/Adminhtml/Order/Cancel.php namespace StackExchange\CancelOrder\Controller\Adminhtml\Order; use Magento\...


Only top voted, non community-wiki answers of a minimum length are eligible