From 400aefd44e917df35ed1b1b08465e6ba29120a3a Mon Sep 17 00:00:00 2001 From: "mykola.dronov" Date: Wed, 7 Jun 2023 11:27:46 +0200 Subject: [PATCH] feat(payment): PAYPAL-2039 added style configs to payment buttons --- CHANGELOG.md | 1 + config.json | 17 ++ schema.json | 438 ++++++++++++++++++++++++++++++++++++++++ schemaTranslations.json | 21 ++ 4 files changed, 477 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ad01fcd10..b11668fd63 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Draft - (sanitize product.description) in the theme results to ‘error length of description’ from Google indexing for lengthy product description [#2363](https://github.com/bigcommerce/cornerstone/pull/2363) +- Added style configs to payment buttons [#2361](https://github.com/bigcommerce/cornerstone/pull/2361) ## 6.11.0 (05-24-2023) - Reverted fix for sold-out badge appearance [#2354](https://github.com/bigcommerce/cornerstone/pull/2354) diff --git a/config.json b/config.json index dc893b070d..86604ce55c 100644 --- a/config.json +++ b/config.json @@ -322,6 +322,23 @@ "pdp-non-sale-price-label": "", "pdp-retail-price-label": "", "pdp-custom-fields-tab-label": "", + "paymentbuttons-paypal-product-details-page-color": "gold", + "paymentbuttons-paylater-product-details-page-color": "gold", + "paymentbuttons-venmo-product-details-page-color": "blue", + "paymentbuttons-paypal-cart-page-add-cart-color": "gold", + "paymentbuttons-paylater-cart-page-add-cart-color": "gold", + "paymentbuttons-venmo-cart-page-add-cart-color": "blue", + "paymentbuttons-paypal-checkout-on-top-color": "gold", + "paymentbuttons-paylater-checkout-on-top-color": "gold", + "paymentbuttons-venmo-checkout-on-top-color": "blue", + "paymentbuttons-paypal-checkout-payment-color": "gold", + "paymentbuttons-paylater-checkout-payment-color": "gold", + "paymentbuttons-venmo-checkout-payment-color": "blue", + "paymentbuttons-paypal-checkout-payment-label": "checkout", + "paymentbuttons-paypal-checkout-on-top-payment-label": "checkout", + "paymentbuttons-paypal-cart-page-add-cart-label": "checkout", + "paymentbuttons-paypal-product-details-page-label": "checkout", + "paymentbuttons-paypal-checkout-payment-size": "medium", "paymentbuttons-paypal-color": "gold", "paymentbuttons-paypal-shape": "rect", "paymentbuttons-paypal-label": "checkout", diff --git a/schema.json b/schema.json index e6401d532c..dbe1b81542 100644 --- a/schema.json +++ b/schema.json @@ -2785,6 +2785,444 @@ "name": "i18n.PaymentButtons", "enable": "smartButtons", "settings": [ + { + "type": "heading", + "content": "i18n.ProductDetailsPage", + "enable": "payPalProvidersEnabled" + }, + { + "type": "select", + "label": "i18n.PayPalButtonColor", + "id": "paymentbuttons-paypal-product-details-page-color", + "enable": "payPalProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "gold", + "label": "i18n.Gold" + }, + { + "value": "blue", + "label": "i18n.Blue" + }, + { + "value": "silver", + "label": "i18n.Silver" + }, + { + "value": "black", + "label": "i18n.Black" + }, + { + "value": "white", + "label": "i18n.White" + } + ] + }, + { + "type": "select", + "label": "i18n.PayLaterButtonColor", + "id": "paymentbuttons-paylater-product-details-page-color", + "enable": "payPalProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "gold", + "label": "i18n.Gold" + }, + { + "value": "blue", + "label": "i18n.Blue" + }, + { + "value": "silver", + "label": "i18n.Silver" + }, + { + "value": "black", + "label": "i18n.Black" + }, + { + "value": "white", + "label": "i18n.White" + } + ] + }, + { + "type": "select", + "label": "i18n.VenmoButtonColor", + "id": "paymentbuttons-venmo-product-details-page-color", + "enable": "venmoProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "blue", + "label": "i18n.Blue" + }, + { + "value": "white", + "label": "i18n.White" + } + ] + }, + { + "type": "select", + "label": "i18n.ButtonContent", + "id": "paymentbuttons-paypal-product-details-page-label", + "enable": "payPalProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "checkout", + "label": "i18n.PayPalCheckout" + }, + { + "value": "pay", + "label": "i18n.PayWithPayPal" + }, + { + "value": "buynow", + "label": "i18n.BuyNow" + }, + { + "value": "paypal", + "label": "i18n.PayPal" + } + ] + }, + { + "type": "heading", + "content": "i18n.CartPageAddToCart" + }, + { + "type": "select", + "label": "i18n.PayPalButtonColor", + "id": "paymentbuttons-paypal-cart-page-add-cart-color", + "enable": "payPalProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "gold", + "label": "i18n.Gold" + }, + { + "value": "blue", + "label": "i18n.Blue" + }, + { + "value": "silver", + "label": "i18n.Silver" + }, + { + "value": "black", + "label": "i18n.Black" + }, + { + "value": "white", + "label": "i18n.White" + } + ] + }, + { + "type": "select", + "label": "i18n.PayLaterButtonColor", + "id": "paymentbuttons-paylater-cart-page-add-cart-color", + "enable": "payPalProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "gold", + "label": "i18n.Gold" + }, + { + "value": "blue", + "label": "i18n.Blue" + }, + { + "value": "silver", + "label": "i18n.Silver" + }, + { + "value": "black", + "label": "i18n.Black" + }, + { + "value": "white", + "label": "i18n.White" + } + ] + }, + { + "type": "select", + "label": "i18n.VenmoButtonColor", + "id": "paymentbuttons-venmo-cart-page-add-cart-color", + "enable": "venmoProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "blue", + "label": "i18n.Blue" + }, + { + "value": "white", + "label": "i18n.White" + } + ] + }, + { + "type": "select", + "label": "i18n.ButtonContent", + "id": "paymentbuttons-paypal-cart-page-add-cart-label", + "enable": "payPalProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "checkout", + "label": "i18n.PayPalCheckout" + }, + { + "value": "pay", + "label": "i18n.PayWithPayPal" + }, + { + "value": "buynow", + "label": "i18n.BuyNow" + }, + { + "value": "paypal", + "label": "i18n.PayPal" + } + ] + }, + { + "type": "heading", + "content": "i18n.CheckoutOnTop" + }, + { + "type": "select", + "label": "i18n.PayPalButtonColor", + "id": "paymentbuttons-paypal-checkout-on-top-color", + "enable": "payPalProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "gold", + "label": "i18n.Gold" + }, + { + "value": "blue", + "label": "i18n.Blue" + }, + { + "value": "silver", + "label": "i18n.Silver" + }, + { + "value": "black", + "label": "i18n.Black" + }, + { + "value": "white", + "label": "i18n.White" + } + ] + }, + { + "type": "select", + "label": "i18n.PayLaterButtonColor", + "id": "paymentbuttons-paylater-checkout-on-top-color", + "enable": "payPalProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "gold", + "label": "i18n.Gold" + }, + { + "value": "blue", + "label": "i18n.Blue" + }, + { + "value": "silver", + "label": "i18n.Silver" + }, + { + "value": "black", + "label": "i18n.Black" + }, + { + "value": "white", + "label": "i18n.White" + } + ] + }, + { + "type": "select", + "label": "i18n.VenmoButtonColor", + "id": "paymentbuttons-venmo-checkout-on-top-color", + "enable": "venmoProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "blue", + "label": "i18n.Blue" + }, + { + "value": "white", + "label": "i18n.White" + } + ] + }, + { + "type": "select", + "label": "i18n.ButtonContent", + "id": "paymentbuttons-paypal-checkout-on-top-payment-label", + "enable": "payPalProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "checkout", + "label": "i18n.PayPalCheckout" + }, + { + "value": "pay", + "label": "i18n.PayWithPayPal" + }, + { + "value": "buynow", + "label": "i18n.BuyNow" + }, + { + "value": "paypal", + "label": "i18n.PayPal" + } + ] + }, + { + "type": "heading", + "content": "i18n.CheckoutPayment" + }, + { + "type": "select", + "label": "i18n.PayPalButtonColor", + "id": "paymentbuttons-paypal-checkout-payment-color", + "enable": "payPalProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "gold", + "label": "i18n.Gold" + }, + { + "value": "blue", + "label": "i18n.Blue" + }, + { + "value": "silver", + "label": "i18n.Silver" + }, + { + "value": "black", + "label": "i18n.Black" + }, + { + "value": "white", + "label": "i18n.White" + } + ] + }, + { + "type": "select", + "label": "i18n.PayLaterButtonColor", + "id": "paymentbuttons-paylater-checkout-payment-color", + "enable": "payPalProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "gold", + "label": "i18n.Gold" + }, + { + "value": "blue", + "label": "i18n.Blue" + }, + { + "value": "silver", + "label": "i18n.Silver" + }, + { + "value": "black", + "label": "i18n.Black" + }, + { + "value": "white", + "label": "i18n.White" + } + ] + }, + { + "type": "select", + "label": "i18n.VenmoButtonColor", + "id": "paymentbuttons-venmo-checkout-payment-color", + "enable": "venmoProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "blue", + "label": "i18n.Blue" + }, + { + "value": "white", + "label": "i18n.White" + } + ] + }, + { + "type": "select", + "label": "i18n.ButtonContent", + "id": "paymentbuttons-paypal-checkout-payment-label", + "enable": "payPalProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "checkout", + "label": "i18n.PayPalCheckout" + }, + { + "value": "pay", + "label": "i18n.PayWithPayPal" + }, + { + "value": "buynow", + "label": "i18n.BuyNow" + }, + { + "value": "paypal", + "label": "i18n.PayPal" + } + ] + }, + { + "type": "select", + "label": "i18n.ButtonSize", + "id": "paymentbuttons-paypal-checkout-payment-size", + "enable": "payPalProvidersEnabled", + "force_reload": true, + "options": [ + { + "value": "small", + "label": "i18n.Small" + }, + { + "value": "medium", + "label": "i18n.Medium" + }, + { + "value": "large", + "label": "i18n.Large" + } + ] + }, { "type": "heading", "content": "i18n.PaymentButtonsContainer" diff --git a/schemaTranslations.json b/schemaTranslations.json index 39c5b1fb9b..c4edc16ea8 100644 --- a/schemaTranslations.json +++ b/schemaTranslations.json @@ -4521,6 +4521,15 @@ "no": "Knappfarge", "ko": "버튼 색상" }, + "i18n.PayPalButtonColor": { + "default": "PayPal button color" + }, + "i18n.PayLaterButtonColor": { + "default": "PayPal Pay Later button color" + }, + "i18n.VenmoButtonColor": { + "default": "Venmo button color" + }, "i18n.Gold": { "default": "Gold", "fr": "Or", @@ -5218,6 +5227,18 @@ "no": "Vær oppmerksom på at for at endringene skal gjelde, må du navigere til PayPal-innstillingene i BC-kontrollpanelen, deaktivere passende meldingsbannere, klikke på «Lagre»-knappen, aktivere banneret igjen, og klikke på «Lagre»-knappen igjen", "ko": "변경 사항을 적용하려면 BC 제어판의 PayPal 설정으로 이동하여 적절한 메시징 배너를 비활성화하고 \"저장\" 버튼을 클릭하고 배너를 다시 활성화한 후 \"저장\" 버튼을 다시 클릭해야 합니다" }, + "i18n.ProductDetailsPage": { + "default": "Product Details Page" + }, + "i18n.CheckoutOnTop": { + "default": "Top of checkout" + }, + "i18n.CheckoutPayment": { + "default": "Checkout Payment Step (Complete order button)" + }, + "i18n.CartPageAddToCart": { + "default": "Cart page & Added to Cart modal window" + }, "i18n.PaymentButtonsContainer": { "default": "Buttons Container Size", "fr": "Taille conteneur de boutons",