Skip to content

Commit 8c6971f

Browse files
committed
MC-42337: PayLater Message display next to other payment method which is not Paypal in Checkout Page
1 parent df3203e commit 8c6971f

File tree

7 files changed

+20
-7
lines changed

7 files changed

+20
-7
lines changed

app/code/Magento/Paypal/Block/PayLater/LayoutProcessor.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@ public function process($jsLayout)
4949
{
5050
if (!$this->payLaterConfig->isEnabled(PayLaterConfig::CHECKOUT_PAYMENT_PLACEMENT)) {
5151
unset($jsLayout['components']['checkout']['children']['steps']['children']['billing-step']
52-
['children']['payment']['children']['payments-list']['children']['before-place-order']['children']
52+
['children']['payment']['children']['payments-list']['children']['paypal-method-extra-content']['children']
5353
['paylater-place-order']);
5454

5555
return $jsLayout;
5656
}
5757

5858
if (isset($jsLayout['components']['checkout']['children']['steps']['children']['billing-step']
59-
['children']['payment']['children']['payments-list']['children']['before-place-order']['children']
59+
['children']['payment']['children']['payments-list']['children']['paypal-method-extra-content']['children']
6060
['paylater-place-order'])
6161
) {
6262
$payLaterPlaceOrder = &$jsLayout['components']['checkout']['children']['steps']['children']['billing-step']
63-
['children']['payment']['children']['payments-list']['children']['before-place-order']['children']
63+
['children']['payment']['children']['payments-list']['children']['paypal-method-extra-content']['children']
6464
['paylater-place-order'];
6565

6666
$componentConfig = $payLaterPlaceOrder['config'] ?? [];

app/code/Magento/Paypal/view/frontend/layout/checkout_index_index.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,13 @@
2525
<item name="children" xsi:type="array">
2626
<item name="payments-list" xsi:type="array">
2727
<item name="children" xsi:type="array">
28-
<item name="before-place-order" xsi:type="array">
28+
<item name="paypal-method-extra-content" xsi:type="array">
29+
<item name="component" xsi:type="string">uiComponent</item>
30+
<item name="displayArea" xsi:type="string">paypal-method-extra-content</item>
2931
<item name="children" xsi:type="array">
3032
<item name="paylater-place-order" xsi:type="array">
3133
<item name="component" xsi:type="string">Magento_Paypal/js/view/paylater</item>
32-
<item name="sortOrder" xsi:type="string">100</item>
33-
<item name="displayArea" xsi:type="string">before-place-order</item>
34+
<item name="displayArea" xsi:type="string">paypal-method-extra-content</item>
3435
</item>
3536
</item>
3637
</item>

app/code/Magento/Paypal/view/frontend/web/template/payment/payflow-express-bml.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
<!-- ko template: getTemplate() --><!-- /ko -->
3939
<!--/ko-->
4040
</div>
41+
<div class="payment-method-extra-content">
42+
<each args="$parent.getRegion('paypal-method-extra-content')" render=""/>
43+
</div>
4144
<div class="actions-toolbar">
4245
<div class="primary">
4346
<button class="action primary checkout"

app/code/Magento/Paypal/view/frontend/web/template/payment/payflow-express.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
<!-- ko template: getTemplate() --><!-- /ko -->
3636
<!--/ko-->
3737
</div>
38+
<div class="payment-method-extra-content">
39+
<each args="$parent.getRegion('paypal-method-extra-content')" render=""/>
40+
</div>
3841
<div class="actions-toolbar">
3942
<div class="primary">
4043
<button class="action primary checkout"

app/code/Magento/Paypal/view/frontend/web/template/payment/paypal-express-in-context.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,8 @@
3131
<each args="$parent.getRegion('before-place-order')" render=""/>
3232
</div>
3333
<div class="actions-toolbar" attr="id: getButtonId()" afterRender="renderPayPalButtons"/>
34+
<div class="payment-method-extra-content">
35+
<each args="$parent.getRegion('paypal-method-extra-content')" render=""/>
36+
</div>
3437
</div>
3538
</div>

app/code/Magento/Paypal/view/frontend/web/template/payment/paypal-express.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
<!-- ko template: getTemplate() --><!-- /ko -->
3737
<!--/ko-->
3838
</div>
39+
<div class="payment-method-extra-content">
40+
<each args="$parent.getRegion('paypal-method-extra-content')" render=""/>
41+
</div>
3942
<div class="actions-toolbar">
4043
<div class="primary">
4144
<button class="action primary checkout"

app/design/frontend/Magento/blank/Magento_Paypal/web/css/source/module/_paylater.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.payment-method-content {
99

1010
.pay-later-message {
11-
margin-bottom: 10px;
11+
margin-top: 10px;
1212
}
1313
}
1414
}

0 commit comments

Comments
 (0)