Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
All Data Structures Namespaces Files Functions Variables Pages
RemoveItem.php
Go to the documentation of this file.
1 <?php
8 
10 {
16  public function execute()
17  {
18  $itemId = $this->getRequest()->getParam('id');
19  $addressId = $this->getRequest()->getParam('address');
20  if ($addressId && $itemId) {
21  $this->_getCheckout()->setCollectRatesFlag(true);
22  $this->_getCheckout()->removeAddressItem($addressId, $itemId);
23  }
24  $this->_redirect('*/*/addresses');
25  }
26 }
_redirect($path, $arguments=[])
Definition: Action.php:167