mirror of
https://github.com/bdnugget/magento2.git
synced 2026-11-07 17:27:36 +00:00
Refactor Search and Multishipping modules. Add integration for admin synonyms delete action.
34 lines
869 B
PHP
34 lines
869 B
PHP
<?php
|
|
/**
|
|
*
|
|
* Copyright © Magento, Inc. All rights reserved.
|
|
* See COPYING.txt for license details.
|
|
*/
|
|
namespace Magento\Multishipping\Controller\Checkout;
|
|
|
|
use Magento\Framework\App\Action\HttpPostActionInterface;
|
|
|
|
/**
|
|
* Class RemoveItem
|
|
*
|
|
* Removes multishipping items
|
|
*/
|
|
class RemoveItem extends \Magento\Multishipping\Controller\Checkout implements HttpPostActionInterface
|
|
{
|
|
/**
|
|
* Multishipping checkout remove item action
|
|
*
|
|
* @return void
|
|
*/
|
|
public function execute()
|
|
{
|
|
$itemId = $this->getRequest()->getParam('id');
|
|
$addressId = $this->getRequest()->getParam('address');
|
|
if ($addressId && $itemId) {
|
|
$this->_getCheckout()->setCollectRatesFlag(true);
|
|
$this->_getCheckout()->removeAddressItem($addressId, $itemId);
|
|
}
|
|
$this->_redirect('*/*/addresses');
|
|
}
|
|
}
|