Skip to content

Commit 35e2402

Browse files
[Magento Community Engineering] Community Contributions - 2.3-develop-prs
- merged with '2.3-develop-expedited-prs' branch
2 parents 0db4606 + a6e92d1 commit 35e2402

File tree

16 files changed

+370
-127
lines changed

16 files changed

+370
-127
lines changed

app/code/Magento/Backend/Block/Store/Switcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ public function getHintHtml()
592592
'What is this?'
593593
) . '"' . ' class="admin__field-tooltip-action action-help"><span>' . __(
594594
'What is this?'
595-
) . '</span></a></span>' . ' </div>';
595+
) . '</span></a>' . ' </div>';
596596
}
597597
return $html;
598598
}

app/code/Magento/CardinalCommerce/etc/adminhtml/system.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,26 +19,41 @@
1919
<label>Environment</label>
2020
<source_model>Magento\CardinalCommerce\Model\Adminhtml\Source\Environment</source_model>
2121
<config_path>three_d_secure/cardinal/environment</config_path>
22+
<depends>
23+
<field id="enabled_authorize">1</field>
24+
</depends>
2225
</field>
2326
<field id="org_unit_id" translate="label" type="obscure" sortOrder="30" showInDefault="1" showInWebsite="1" showInStore="0">
2427
<label>Org Unit Id</label>
2528
<config_path>three_d_secure/cardinal/org_unit_id</config_path>
2629
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
30+
<depends>
31+
<field id="enabled_authorize">1</field>
32+
</depends>
2733
</field>
2834
<field id="api_key" translate="label" type="obscure" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0">
2935
<label>API Key</label>
3036
<config_path>three_d_secure/cardinal/api_key</config_path>
3137
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
38+
<depends>
39+
<field id="enabled_authorize">1</field>
40+
</depends>
3241
</field>
3342
<field id="api_identifier" translate="label" type="obscure" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0">
3443
<label>API Identifier</label>
3544
<config_path>three_d_secure/cardinal/api_identifier</config_path>
3645
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
46+
<depends>
47+
<field id="enabled_authorize">1</field>
48+
</depends>
3749
</field>
3850
<field id="debug" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0">
3951
<label>Debug</label>
4052
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
4153
<config_path>three_d_secure/cardinal/debug</config_path>
54+
<depends>
55+
<field id="enabled_authorize">1</field>
56+
</depends>
4257
</field>
4358
</group>
4459
</group>

app/code/Magento/Paypal/view/adminhtml/web/styles.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
.paypal-recommended-header > .admin__collapsible-block > a::before {content: "" !important;}
2929
.paypal-other-header > .admin__collapsible-block > a::before {content: '' !important; width: 0; height: 0; border-color: transparent; border-top-color: #000; border-style: solid; border-width: .8rem .5rem 0 .5rem; margin-top:1px; transition: all .2s linear;}
3030
.paypal-other-header > .admin__collapsible-block > a.open::before {border-color: transparent; border-bottom-color: #000; border-width: 0 .5rem .8rem .5rem;}
31-
.paypal-other-header > .admin__collapsible-block > a {color: #007bdb !important; text-align: right;}
3231
.payments-other-header > .admin__collapsible-block > a,
33-
.paypal-recommended-header > .admin__collapsible-block > a {display: inline-block;}
32+
.paypal-recommended-header > .admin__collapsible-block > a,
33+
.paypal-other-header > .admin__collapsible-block > a {display: inline-block;}
3434
.payments-other-header > .admin__collapsible-block > a::before,
3535
.paypal-recommended-header > .admin__collapsible-block > a::before {content: '' !important; width: 0; height: 0; border-color: transparent; border-top-color: #000; border-style: solid; border-width: .8rem .5rem 0 .5rem; margin-top:1px; transition: all .2s linear;}
3636
.payments-other-header > .admin__collapsible-block > a.open::before,

app/code/Magento/Quote/Api/CartManagementInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ public function getCartForCustomer($customerId);
5252
* @param int $customerId The customer ID.
5353
* @param int $storeId
5454
* @return boolean
55+
* @throws \Magento\Framework\Exception\LocalizedException
56+
* @throws \Magento\Framework\Exception\StateException
57+
* @throws \Magento\Framework\Exception\NoSuchEntityException
5558
*/
5659
public function assignCustomer($cartId, $customerId, $storeId);
5760

app/code/Magento/Quote/Model/QuoteManagement.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,22 +298,28 @@ public function assignCustomer($cartId, $customerId, $storeId)
298298
);
299299
}
300300
try {
301-
$this->quoteRepository->getForCustomer($customerId);
302-
throw new StateException(
303-
__("The customer can't be assigned to the cart because the customer already has an active cart.")
304-
);
301+
$customerActiveQuote = $this->quoteRepository->getForCustomer($customerId);
302+
303+
$quote->merge($customerActiveQuote);
304+
$customerActiveQuote->setIsActive(0);
305+
$this->quoteRepository->save($customerActiveQuote);
306+
305307
// phpcs:ignore Magento2.CodeAnalysis.EmptyBlock
306308
} catch (\Magento\Framework\Exception\NoSuchEntityException $e) {
307309
}
308310

309311
$quote->setCustomer($customer);
310312
$quote->setCustomerIsGuest(0);
313+
$quote->setIsActive(1);
314+
311315
/** @var \Magento\Quote\Model\QuoteIdMask $quoteIdMask */
312316
$quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'quote_id');
313317
if ($quoteIdMask->getId()) {
314318
$quoteIdMask->delete();
315319
}
320+
316321
$this->quoteRepository->save($quote);
322+
317323
return true;
318324
}
319325

0 commit comments

Comments
 (0)