/** * Prepare layout * * Add button that clears customer's shopping cart * * @return $this */ protected function _prepareLayout() { $deleteAllConfirmString = __('Are you sure you want to delete all items from shopping cart?'); $this->addChild('empty_customer_cart_button', 'Magento\\Backend\\Block\\Widget\\Button', ['label' => __('Clear Shopping Cart'), 'onclick' => 'order.clearShoppingCart(\'' . $deleteAllConfirmString . '\')']); return parent::_prepareLayout(); }