Skip to content

Commit

Permalink
feat(payments): PAYPAL-1345 adding button settings to the page builder
Browse files Browse the repository at this point in the history
  • Loading branch information
bc-fetisov committed May 18, 2022
1 parent 9360485 commit acafb81
Show file tree
Hide file tree
Showing 3 changed files with 202 additions and 39 deletions.
8 changes: 7 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"show_accept_klarna": false,
"show_product_details_tabs": true,
"show_product_reviews": true,
"show_quick_payment_buttons": false,
"show_custom_fields_tabs": false,
"show_product_weight": true,
"show_product_dimensions": false,
Expand Down Expand Up @@ -351,7 +352,12 @@
"checkout-paymentbuttons-paypal-color": "black",
"checkout-paymentbuttons-paypal-shape": "rect",
"checkout-paymentbuttons-paypal-size": "large",
"checkout-paymentbuttons-paypal-label": "pay"
"checkout-paymentbuttons-paypal-label": "pay",
"afterPay-button": "black-mint",
"amazon-button": "Gold",
"googlePay-button": "black",
"masterpass-button": "black",
"paymentbuttons-number-of-buttons": 1
},
"read_only_files": [
"/assets/scss/components/citadel",
Expand Down
180 changes: 159 additions & 21 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -905,25 +905,6 @@
"force_reload": true,
"id": "show_accept_googlepay"
},
{
"type": "select",
"label": "i18n.ApplePayColor",
"id": "applePay-button",
"options": [
{
"value": "black",
"label": "i18n.BlackWhiteText"
},
{
"value": "white",
"label": "i18n.WhiteBlackText"
},
{
"value": "white-border",
"label": "i18n.WhiteBlackTextWithBorder"
}
]
},
{
"type": "checkbox",
"label": "i18n.ShowKlarna",
Expand Down Expand Up @@ -1495,6 +1476,12 @@
"label": "i18n.WishlistDropdownBackground",
"id": "dropdown--wishList-backgroundColor"
},
{
"type": "checkbox",
"label": "i18n.ShowQuickPaymentButtons",
"force_reload": true,
"id": "show_quick_payment_buttons"
},
{
"type": "heading",
"content": "i18n.NumberOfProductsDisplayed"
Expand Down Expand Up @@ -2836,12 +2823,34 @@
},
{
"type": "heading",
"content": "i18n.SmartPaypalButton"
"content": "i18n.QuickPaymentButtons"
},
{
"type": "select",
"label": "i18n.NumberOfButtonsAlwaysVisible",
"force_reload": true,
"id": "paymentbuttons-number-of-buttons",
"options": [
{
"value": 1,
"label": "1"
},
{
"value": 2,
"label": "2"
}
]
},
{
"type": "heading",
"content": "i18n.SmartPaypalButton",
"enable": "payPalProvidersEnabled"
},
{
"type": "select",
"label": "i18n.ButtonColor",
"id": "paymentbuttons-paypal-color",
"enable": "payPalProvidersEnabled",
"force_reload": true,
"options": [
{
Expand Down Expand Up @@ -2870,6 +2879,7 @@
"type": "select",
"label": "i18n.ButtonShape",
"id": "paymentbuttons-paypal-shape",
"enable": "payPalProvidersEnabled",
"force_reload": true,
"options": [
{
Expand All @@ -2886,6 +2896,7 @@
"type": "select",
"label": "i18n.ButtonContent",
"id": "paymentbuttons-paypal-label",
"enable": "payPalProvidersEnabled",
"force_reload": true,
"options": [
{
Expand All @@ -2910,6 +2921,7 @@
"type": "select",
"label": "i18n.DisplayStyle",
"id": "paymentbuttons-paypal-layout",
"enable": "payPalProvidersEnabled",
"force_reload": true,
"options": [
{
Expand All @@ -2924,12 +2936,14 @@
},
{
"type": "heading",
"content": "i18n.CheckoutPayPalButton"
"content": "i18n.CheckoutPayPalButton",
"enable": "payPalProvidersEnabled"
},
{
"type": "select",
"label": "i18n.ButtonColor",
"id": "checkout-paymentbuttons-paypal-color",
"enable": "payPalProvidersEnabled",
"force_reload": true,
"options": [
{
Expand Down Expand Up @@ -2958,6 +2972,7 @@
"type": "select",
"label": "i18n.ButtonShape",
"id": "checkout-paymentbuttons-paypal-shape",
"enable": "payPalProvidersEnabled",
"force_reload": true,
"options": [
{
Expand All @@ -2974,6 +2989,7 @@
"type": "select",
"label": "i18n.ButtonSize",
"id": "checkout-paymentbuttons-paypal-size",
"enable": "payPalProvidersEnabled",
"force_reload": true,
"options": [
{
Expand All @@ -2994,6 +3010,7 @@
"type": "select",
"label": "i18n.ButtonContent",
"id": "checkout-paymentbuttons-paypal-label",
"enable": "payPalProvidersEnabled",
"force_reload": true,
"options": [
{
Expand All @@ -3013,6 +3030,127 @@
"label": "i18n.PayPal"
}
]
},
{
"type": "heading",
"content": "i18n.ApplePaySettings",
"enable": "appleProvidersEnabled"
},
{
"type": "select",
"label": "i18n.ButtonColor",
"id": "applePay-button",
"enable": "appleProvidersEnabled",
"options": [
{
"value": "black",
"label": "i18n.BlackWhiteText"
},
{
"value": "white",
"label": "i18n.WhiteBlackText"
},
{
"value": "white-border",
"label": "i18n.WhiteBlackTextWithBorder"
}
]
},
{
"type": "heading",
"content": "i18n.AfterPaySettings",
"enable": "afterpayProvidersEnabled"
},
{
"type": "select",
"label": "i18n.ButtonColor",
"id": "afterPay-button",
"enable": "afterpayProvidersEnabled",
"options": [
{
"value": "black-mint",
"label": "i18n.BlackOnMintText"
},
{
"value": "mint-black",
"label": "i18n.MintOnBlackText"
},
{
"value": "white",
"label": "i18n.BlackWhiteText"
},
{
"value": "black",
"label": "i18n.WhiteBlackText"
}
]
},
{
"type": "heading",
"content": "i18n.AmazonSettings",
"enable": "amazonProvidersEnabled"
},
{
"type": "select",
"label": "i18n.ButtonColor",
"id": "amazon-button",
"enable": "amazonProvidersEnabled",
"options": [
{
"value": "Gold",
"label": "i18n.Gold"
},
{
"value": "LightGray",
"label": "i18n.LightGray"
},
{
"value": "DarkGray",
"label": "i18n.DarkGray"
}
]
},
{
"type": "heading",
"content": "i18n.GooglePaySettings",
"enable": "googleProvidersEnabled"
},
{
"type": "select",
"label": "i18n.ButtonColor",
"id": "googlePay-button",
"enable": "googleProvidersEnabled",
"options": [
{
"value": "black",
"label": "i18n.BlackWhiteText"
},
{
"value": "white",
"label": "i18n.WhiteBlackText"
}
]
},
{
"type": "heading",
"content": "i18n.MasterpassSettings",
"enable": "masterpassProvidersEnabled"
},
{
"type": "select",
"label": "i18n.ButtonColor",
"id": "masterpass-button",
"enable": "masterpassProvidersEnabled",
"options": [
{
"value": "black",
"label": "i18n.BlackWhiteText"
},
{
"value": "white",
"label": "i18n.WhiteBlackText"
}
]
}
]
},
Expand Down
53 changes: 36 additions & 17 deletions schemaTranslations.json
Original file line number Diff line number Diff line change
Expand Up @@ -1990,23 +1990,6 @@
"da": "Vis Google Pay",
"no": "Vis Google Pay"
},
"i18n.ApplePayColor": {
"default": "Apple Pay color",
"fr": "Couleur Apple Pay",
"it": "Colore Apple Pay",
"uk": "Колір Apple Pay",
"zh": "Apple 支付颜色",
"de": "Apple Pay-Farbe",
"es": "Color de Apple Pay",
"nl": "Kleur Apple Pay",
"pt": "Cor do Apple Pay",
"sv": "Apple Pay-färg",
"es-MX": "Color de Apple Pay",
"pt-BR": "Cor do Apple Pay",
"es-419": "Color de Apple Pay",
"da": "Apple Pay-farve",
"no": "Apple Pay-farge"
},
"i18n.BlackWhiteText": {
"default": "Black (white text)",
"fr": "Noir text blanc",
Expand Down Expand Up @@ -5195,5 +5178,41 @@
"es-419": "Tamaño del contenedor de botones",
"da": "Størrelse på knapbeholder",
"no": "Størrelse på knappbeholder"
},
"i18n.AfterPaySettings": {
"default": "After Pay Button"
},
"i18n.ApplePaySettings": {
"default": "Apple Pay Button"
},
"i18n.BlackOnMintText": {
"default": "Black on Mint"
},
"i18n.MintOnBlackText": {
"default": "Mint on Black"
},
"i18n.AmazonSettings": {
"default": "Amazon Button"
},
"i18n.LightGray": {
"default": "Light Gray"
},
"i18n.DarkGray": {
"default": "Dark Gray"
},
"i18n.GooglePaySettings": {
"default": "Google Pay Button"
},
"i18n.MasterpassSettings": {
"default": "Masterpass Button"
},
"i18n.ShowQuickPaymentButtons": {
"default": "Show quick payment buttons"
},
"i18n.QuickPaymentButtons": {
"default": "Quick payment buttons"
},
"i18n.NumberOfButtonsAlwaysVisible": {
"default": "Number of buttons always visible"
}
}

0 comments on commit acafb81

Please sign in to comment.