Skip to content

Commit

Permalink
Fix hummingbird selectors & Pay Later banner display
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt75 committed Mar 5, 2024
1 parent 93fe284 commit 7262153
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class PayLaterBannerPs1_6Component extends BaseComponent {
if (null === document.querySelector(containerIdentifier)) {
let containerElement = document.createElement('div');
containerElement.id = containerIdentifier.slice(1);
containerElement.classList.add('container');
containerElement.classList.add('container', 'paypal-pay-later-banner');
querySelector.append(containerElement);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class PayLaterBannerPs1_7Component extends BaseComponent {
if (null === document.querySelector(containerIdentifier)) {
let containerElement = document.createElement('div');
containerElement.id = containerIdentifier.slice(1);
containerElement.classList.add('mb-2');
containerElement.classList.add('paypal-pay-later-banner');
querySelector.append(containerElement);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class PayLaterMessagePs1_6Component extends BaseComponent {
if (null === document.querySelector(containerIdentifier)) {
let containerElement = document.createElement('div');
containerElement.id = containerIdentifier.slice(1);
containerElement.classList.add('paypal-pay-later-message');
querySelector.append(containerElement);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export class PayLaterMessagePs1_7Component extends BaseComponent {
if (null === document.querySelector(containerIdentifier)) {
let containerElement = document.createElement('div');
containerElement.id = containerIdentifier.slice(1);
containerElement.classList.add('paypal-pay-later-message');
querySelector.append(containerElement);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ export const DefaultSelectors1_7Hummingbird = {
CVV_ERROR: '#ps_checkout-card-fields-cvv-error',
},

PAYMENT_METHOD_LOGO_PRODUCT_CONTAINER: '#product .product-add-to-cart',
PAYMENT_METHOD_LOGO_CART_CONTAINER: '#cart .cart-summary .cart-detailed-actions'
PAYMENT_METHOD_LOGO_PRODUCT_CONTAINER: '#product .product__add-to-cart',
PAYMENT_METHOD_LOGO_CART_CONTAINER: '#cart .cart-summary .cart-detailed__actions'
};
13 changes: 13 additions & 0 deletions views/css/payments.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
* @copyright Since 2007 PrestaShop SA and Contributors
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License version 3.0
*/

.payment__option.ps_checkout-payment-option input[type="radio"] {
margin-top: .7rem;
}

.payment-options > div.payment-option[id$="card-container"] > span.custom-radio {
margin-top: .25rem;
}
Expand Down Expand Up @@ -511,3 +516,11 @@ label[for="ps_checkout-hosted-fields-card-cvv"] {
#ps_checkout-card-fields-form .ps_checkout-card-fields-cvv-label-wrapper>label {
display: table-cell;
}

.paypal-pay-later-banner {
margin: 0.5em auto;
}

.paypal-pay-later-banner > span {
margin: auto;
}
8 changes: 8 additions & 0 deletions views/css/payments16.css
Original file line number Diff line number Diff line change
Expand Up @@ -481,3 +481,11 @@
#ps_checkout-card-fields-form .ps_checkout-card-fields-cvv-label-wrapper>label {
display: table-cell;
}

.paypal-pay-later-banner {
margin: 0.5em auto;
}

.paypal-pay-later-banner > span {
margin: auto;
}

0 comments on commit 7262153

Please sign in to comment.