Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hello there,
How do I add the payment icons underneath the checkout button on my cart page?
I use the dawn theme.
This is the code I've added in my footer which I also want to add underneath my checkout button:
<ul class="list list-payment" role="list">
{% assign enabled_payment_types = 'ideal,visa,maestro,master,american_express,bancontact' | remove: ' ' | split: ',' %}
{% for type in enabled_payment_types %}
<li class="list-payment__item">
{{ type | payment_type_svg_tag: class: 'icon icon--full-color' }}
</li>
{%- endfor -%}
</ul>
Kind regards,
Yordi
@suyash1
I'm not technical. If you can kindly give some specific place where I add this code.
I've tried it under multiple buttons in the checkout-drawer.liquid file but nothings seems to change.
Hello @YordiMNL
It's GemPages support team and glad to support you today.
I would like to give you a solution to support you:
1. Go to Online Store -> Theme -> Edit code:
2. Open your Sections/main-cart-footer.liquid theme file
3. Find line 65 and added code after:
<ul class="list list-payment" role="list" style="margin-top:10px;">
{% assign enabled_payment_types = 'ideal,visa,maestro,master,american_express,bancontact' | remove: ' ' | split: ',' %}
{% for type in enabled_payment_types %}
<li class="list-payment__item">
{{ type | payment_type_svg_tag: class: 'icon icon--full-color' }}
</li>
{%- endfor -%}
</ul>
Result:
Hope my solution can work and support you!
Kind & Best regards!
GemPages Support Team.
@GemPages
Thank your very much for the information, it worked!
But how to increase the spacing between the payment icons and the button?
I added a css 'margin top: 10px' in your code
You can change it with a suitable number
Hope my solution can work and support you!
Kind & Best regards!
GemPages Support Team.
Hi, I also entered the code but it does not work. Do you have any ideas why it doesn't ?
This should be the accepted solution. Thank you.