Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Amazon Pay and Google Pay to payment icons in footer #1542

Merged
merged 4 commits into from
Jul 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions assets/icons/logo-amazonpay.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/icons/logo-googlepay.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/img/icon-sprite.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
"show_accept_mastercard": false,
"show_accept_paypal": false,
"show_accept_visa": false,
"show_accept_amazonpay": false,
"show_accept_googlepay": false,
"show_product_details_tabs": true,
"show_product_reviews_tabs": false,
"show_custom_fields_tabs": false,
Expand Down
12 changes: 12 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -860,6 +860,18 @@
"force_reload": true,
"id": "show_accept_visa"
},
{
"type": "checkbox",
"label": "Show Amazon Pay",
"force_reload": true,
"id": "show_accept_amazonpay"
},
{
"type": "checkbox",
"label": "Show Google Pay",
"force_reload": true,
"id": "show_accept_googlepay"
},
{
"type": "select",
"label": "Apple Pay color",
Expand Down
2 changes: 1 addition & 1 deletion templates/components/amp/common/icon-defs.html

Large diffs are not rendered by default.

42 changes: 24 additions & 18 deletions templates/components/common/payment-icons.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
{{#with theme_settings}}
{{#or show_accept_amex show_accept_discover show_accept_mastercard show_accept_paypal show_accept_visa}}
<div class="footer-payment-icons">
{{#if show_accept_amex}}
<svg class="footer-payment-icon"><use xlink:href="#icon-logo-american-express"></use></svg>
{{/if}}
{{#if show_accept_discover}}
<svg class="footer-payment-icon"><use xlink:href="#icon-logo-discover"></use></svg>
{{/if}}
{{#if show_accept_mastercard}}
<svg class="footer-payment-icon"><use xlink:href="#icon-logo-mastercard"></use></svg>
{{/if}}
{{#if show_accept_paypal}}
<svg class="footer-payment-icon"><use xlink:href="#icon-logo-paypal"></use></svg>
{{/if}}
{{#if show_accept_visa}}
<svg class="footer-payment-icon"><use xlink:href="#icon-logo-visa"></use></svg>
{{/if}}
</div>
{{#or show_accept_amex show_accept_discover show_accept_mastercard show_accept_paypal show_accept_visa show_accept_amazonpay show_accept_googlepay}}
<div class="footer-payment-icons">
{{#if show_accept_amex}}
<svg class="footer-payment-icon"><use xlink:href="#icon-logo-american-express"></use></svg>
{{/if}}
{{#if show_accept_discover}}
<svg class="footer-payment-icon"><use xlink:href="#icon-logo-discover"></use></svg>
{{/if}}
{{#if show_accept_mastercard}}
<svg class="footer-payment-icon"><use xlink:href="#icon-logo-mastercard"></use></svg>
{{/if}}
{{#if show_accept_paypal}}
<svg class="footer-payment-icon"><use xlink:href="#icon-logo-paypal"></use></svg>
{{/if}}
{{#if show_accept_visa}}
<svg class="footer-payment-icon"><use xlink:href="#icon-logo-visa"></use></svg>
{{/if}}
{{#if show_accept_amazonpay}}
<svg class="footer-payment-icon"><use xlink:href="#icon-logo-amazonpay"></use></svg>
{{/if}}
{{#if show_accept_googlepay}}
<svg class="footer-payment-icon"><use xlink:href="#icon-logo-googlepay"></use></svg>
{{/if}}
</div>
{{/or}}
{{/with}}