File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
Multishipping/Test/Mftf/Test Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 68
68
</actionGroup >
69
69
<!-- Save updated addresses -->
70
70
<actionGroup ref =" StorefrontMultiShippingSaveAddressActionGroup" stepKey =" saveThreeDifferentAddresses" />
71
+ <!-- Verify there are 3 items available on cart page -->
72
+ <seeNumberOfElements userInput =" 3" selector =" a.action.delete" stepKey =" seeThreeItems" />
71
73
<!-- Remove first simple item from cart -->
72
74
<actionGroup ref =" StorefrontRemoveProductOnCheckoutActionGroup" stepKey =" removeFirstItemFromCart" />
73
75
<waitForPageLoad time =" 30" stepKey =" waitForCartSummaryPageToLoadAfterRemovalOfFirstItem" />
76
+ <!-- Verify there are 2 items still available after removal of first -->
77
+ <seeNumberOfElements userInput =" 2" selector =" a.action.delete" stepKey =" seeTwoItems" />
74
78
<!-- Remove second simple item from cart -->
75
79
<actionGroup ref =" StorefrontRemoveProductOnCheckoutActionGroup" stepKey =" removeSecondItemFromCart" />
76
80
<waitForPageLoad time =" 30" stepKey =" waitForCartSummaryPageToLoadAfterRemovalOfSecondItem" />
81
+ <!-- Verify there are 1 items still available after removal of second -->
82
+ <seeNumberOfElements userInput =" 1" selector =" a.action.delete" stepKey =" seeOneItems" />
77
83
<!-- Remove second simple item from cart -->
78
84
<actionGroup ref =" StorefrontRemoveProductOnCheckoutActionGroup" stepKey =" removeThirdItemFromCart" />
79
85
<waitForPageLoad time =" 30" stepKey =" waitForCartSummaryPageToLoadAfterRemovalOfTestItem" />
Original file line number Diff line number Diff line change @@ -2544,12 +2544,13 @@ public function getShippingAddressesItems()
2544
2544
if ($ item ->getQty () > 1 ) {
2545
2545
//DB table `quote_item` qty value can not be set to 1, if having more than 1 child references
2546
2546
//in table `quote_address_item`.
2547
- if (count ($ this ->getQuoteShippingAddressItemsByQuoteItemId ($ item ->getItemId ())) > 1 ) {
2547
+ if ($ item ->getItemId () !== null
2548
+ && count ($ this ->getQuoteShippingAddressItemsByQuoteItemId ($ item ->getItemId ())) > 1 ) {
2548
2549
continue ;
2549
2550
}
2550
2551
2551
2552
for ($ itemIndex = 0 , $ itemQty = $ item ->getQty (); $ itemIndex < $ itemQty ; $ itemIndex ++) {
2552
- if ($ itemIndex == 0 ) {
2553
+ if ($ itemIndex === 0 ) {
2553
2554
$ addressItem = $ item ;
2554
2555
} else {
2555
2556
$ addressItem = clone $ item ;
@@ -2679,10 +2680,7 @@ private function getQuoteShippingAddressItemsByQuoteItemId($itemId = null): arra
2679
2680
$ addresses = $ this ->getAllShippingAddresses ();
2680
2681
foreach ($ addresses as $ address ) {
2681
2682
foreach ($ address ->getAllItems () as $ item ) {
2682
- if ($ item ->getParentItemId ()) {
2683
- continue ;
2684
- }
2685
- if ($ item ->getProduct ()->getIsVirtual ()) {
2683
+ if ($ item ->getParentItemId () || $ item ->getProduct ()->getIsVirtual ()) {
2686
2684
continue ;
2687
2685
}
2688
2686
if ($ item ->getQuoteItemId () === $ itemId ) {
You can’t perform that action at this time.
0 commit comments