Skip to content

Commit c9490e0

Browse files
author
Viktor Kopin
committed
MC-40678: Cart page subtotal shows wrong when we back from multishipping
1 parent ad0ba79 commit c9490e0

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

app/code/Magento/Multishipping/Model/Cart/Controller/CartPlugin.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function beforeDispatch(Cart $subject, RequestInterface $request)
7373
{
7474
/** @var Quote $quote */
7575
$quote = $this->checkoutSession->getQuote();
76-
if ($quote->isMultipleShippingAddresses() && $this->isCheckoutComplete()) {
76+
if ($quote->isMultipleShippingAddresses()) {
7777
$this->disableMultishipping->execute($quote);
7878
foreach ($quote->getAllShippingAddresses() as $address) {
7979
$quote->removeAddress($address->getId());
@@ -92,16 +92,6 @@ public function beforeDispatch(Cart $subject, RequestInterface $request)
9292
}
9393
}
9494

95-
/**
96-
* Checks whether the checkout flow is complete
97-
*
98-
* @return bool
99-
*/
100-
private function isCheckoutComplete() : bool
101-
{
102-
return (bool) ($this->checkoutSession->getStepData(State::STEP_SHIPPING)['is_complete'] ?? true);
103-
}
104-
10595
/**
10696
* Checks whether quote has virtual items
10797
*

app/code/Magento/Multishipping/Test/Mftf/Test/StorefrontProcessMultishippingCheckoutWhenCartPageIsOpenedInAnotherTabTest.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@
8585
</actionGroup>
8686
<switchToNextTab stepKey="switchToNextTab"/>
8787
<!-- Click 'Continue to Billing Information' and 'Go to Review Your Order' -->
88+
<actionGroup ref="StorefrontGoToBillingInformationActionGroup" stepKey="redirectToSelectAddressAfterReset"/>
89+
<seeOptionIsSelected selector="{{StorefrontCheckoutShippingMultipleAddressesSection.selectedMultipleShippingAddress('1')}}" userInput="{{US_Address_NY.street[1]}}" stepKey="checkAddressIsReset"/>
90+
<actionGroup ref="StorefrontCheckoutShippingSelectMultipleAddressesActionGroup" stepKey="selectMultipleAddressesAfterReset">
91+
<argument name="firstAddress" value="{{UK_Not_Default_Address.street[0]}}"/>
92+
<argument name="secondAddress" value="{{US_Address_NY.street[1]}}"/>
93+
</actionGroup>
8894
<actionGroup ref="StorefrontGoToBillingInformationActionGroup" stepKey="goToBillingInformation"/>
8995
<see selector="{{ShipmentFormSection.shippingAddress}}" userInput="{{US_Address_NY.city}}" stepKey="seeBillingAddress"/>
9096
<waitForElementVisible selector="{{StorefrontMultipleShippingMethodSection.goToReviewYourOrderButton}}" stepKey="waitForGoToReviewYourOrderVisible" />

0 commit comments

Comments
 (0)