-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7595 from magento-gl/gl_pr_arrows_april21_2022
Arrows Team - Bugfix delivery
- Loading branch information
Showing
9 changed files
with
420 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
app/code/Magento/Multishipping/Model/Cart/Controller/MiniCartPlugin.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Magento\Multishipping\Model\Cart\Controller; | ||
|
||
use Magento\Checkout\Controller\Sidebar\UpdateItemQty; | ||
use Magento\Framework\App\RequestInterface; | ||
use Magento\Framework\Exception\LocalizedException; | ||
use Magento\Multishipping\Model\Cart\MultishippingClearItemAddress; | ||
|
||
/** | ||
* Cleans shipping addresses and item assignments after MultiShipping flow | ||
*/ | ||
class MiniCartPlugin | ||
{ | ||
/** | ||
* @var MultishippingClearItemAddress | ||
*/ | ||
private $multishippingClearItemAddress; | ||
|
||
/** | ||
* @param MultishippingClearItemAddress $multishippingClearItemAddress | ||
*/ | ||
public function __construct( | ||
MultishippingClearItemAddress $multishippingClearItemAddress | ||
) { | ||
$this->multishippingClearItemAddress = $multishippingClearItemAddress; | ||
} | ||
|
||
/** | ||
* Cleans shipping addresses and item assignments after MultiShipping flow | ||
* | ||
* @param UpdateItemQty $subject | ||
* @param RequestInterface $request | ||
* @return void | ||
* @SuppressWarnings(PHPMD.UnusedFormalParameter) | ||
* @throws LocalizedException | ||
*/ | ||
public function beforeDispatch(UpdateItemQty $subject, RequestInterface $request) | ||
{ | ||
$this->multishippingClearItemAddress->clearAddressItem($subject, $request); | ||
} | ||
} |
Oops, something went wrong.