RemoveItem.php 713 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Multishipping\Controller\Checkout;
  8. class RemoveItem extends \Magento\Multishipping\Controller\Checkout
  9. {
  10. /**
  11. * Multishipping checkout remove item action
  12. *
  13. * @return void
  14. */
  15. public function execute()
  16. {
  17. $itemId = $this->getRequest()->getParam('id');
  18. $addressId = $this->getRequest()->getParam('address');
  19. if ($addressId && $itemId) {
  20. $this->_getCheckout()->setCollectRatesFlag(true);
  21. $this->_getCheckout()->removeAddressItem($addressId, $itemId);
  22. }
  23. $this->_redirect('*/*/addresses');
  24. }
  25. }