From 575b85acafc56a0b1cc2df6e508bb71fe34f3a2b Mon Sep 17 00:00:00 2001 From: "serhii.tkachenko" Date: Tue, 6 Sep 2022 14:25:53 +0300 Subject: [PATCH] feat(payment): PAYPAL-1474 added an ID for 'Check out' button and added extra container to render Accelerated Checkout in --- .../scss/components/stencil/cart/_cart.scss | 21 ++++++++++++++----- templates/components/common/cart-preview.html | 9 +++++++- templates/pages/cart.html | 21 +++++++++++++++---- 3 files changed, 41 insertions(+), 10 deletions(-) diff --git a/assets/scss/components/stencil/cart/_cart.scss b/assets/scss/components/stencil/cart/_cart.scss index 1c08e8b25b..38df0610f6 100644 --- a/assets/scss/components/stencil/cart/_cart.scss +++ b/assets/scss/components/stencil/cart/_cart.scss @@ -535,14 +535,15 @@ $card-preview-zoom-bottom-offset: 6rem; } } -.cart-additionalCheckoutButtons { - @extend %additionalCheckoutButtons; +.cart-acceleratedCheckoutButtons { + align-items: end; + display: flex; + flex-direction: column; + width: 100%; } -.previewCart-additionalCheckoutButtons { +.cart-additionalCheckoutButtons { @extend %additionalCheckoutButtons; - padding-bottom: spacing("single"); - padding-right: spacing("single"); } // Cart Preview @@ -679,3 +680,13 @@ $card-preview-zoom-bottom-offset: 6rem; padding: spacing("double"); text-align: center; } + +.previewCart-acceleratedCheckoutButtons { + width: 100%; +} + +.previewCart-additionalCheckoutButtons { + @extend %additionalCheckoutButtons; + padding-bottom: spacing("single"); + padding-right: spacing("single"); +} diff --git a/templates/components/common/cart-preview.html b/templates/components/common/cart-preview.html index 3d416e3a64..303bd12380 100644 --- a/templates/components/common/cart-preview.html +++ b/templates/components/common/cart-preview.html @@ -47,9 +47,16 @@
{{/each}}
+ {{#if cart.additional_checkout_buttons}} +
+ {{/if}} {{#if cart.show_primary_checkout_button}} diff --git a/templates/pages/cart.html b/templates/pages/cart.html index 1d03614e28..ff815ed435 100644 --- a/templates/pages/cart.html +++ b/templates/pages/cart.html @@ -28,9 +28,20 @@ {{{region name="cart_below_totals"}}} + {{#if cart.additional_checkout_buttons}} +
+ {{/if}} + {{#if cart.show_primary_checkout_button}} {{/if}} -
- {{> components/cart/additional-checkout-buttons}} -
+ {{#if cart.additional_checkout_buttons}} +
+ {{> components/cart/additional-checkout-buttons}} +
+ {{/if}} {{else}}

{{lang 'cart.checkout.empty_cart'}}