Dawn theme - Choose which payment icons to display

Hello everyone,

Noticed that with the last Shopify’s Dawn theme update, this footer’s line code does not work anymore…

{% assign enabled_payment_types = 'paypal,visa,master,american_express' | remove: ' ' | split: ',' %}

This code was used to show the payment types you want.

Any tip on how to solve this query?

Thank you in advance.

@King-Kang - please check payment settings, I think only the options which you enable are shown in the footer

Hello @suyash1 ,

I appreciate your efforts, what I´m trying to achieve is the solution that Shopify provided before on previous themes like Debut, and another one that I managed to do for the Dawn theme, before the last update.

This is useful for custom payments, or just to show/hide some payment icons that you provide.

Outdated tutorial (just to show as an example)
https://help.shopify.com/en/manual/online-store/themes/themes-by-shopify/vintage-themes/customizing-vintage-themes/add-credit-card-icons

@King-Kang - sorry I thought something else, my bad.

No problem @suyash1

Thank you anyway

Hi @King-Kang ,

You try this code:

{% assign payment_string = 'visa,master,maestro,american_express,apple_pay,bitcoin,dankort,diners_club,discover,paypal,dogecoin,dwolla,forbrugsforeningen,jcb,litecoin,afterpay,google_pay,ideal,klarna,klarna-pay-later,shopify_pay,sofort' %}
{% assign methods = payment_string | split: ',' %}
{%- for method in methods -%}
    {%- assign show_current_method = method | prepend: 'show_payment_' -%}
    {% if section.settings[show_current_method] %}
        - {{ method | payment_type_svg_tag: class: 'icon icon--full-color' }}
        

        {% endif %}
{%- endfor -%}

If you feel like my answer is helpful, please mark it as a SOLUTION. Let me know if you have any further questions.

Best regards.

1 Like

Thank you very much for the reply @AvadaCommerce ,

I already found the solution. Only need to remove the shop. from the code, and solved!

So I changed this code

{% assign enabled_payment_types = 'paypal,visa,master,american_express' | remove: ' ' | split: ',' %}
{%- for type in shop.enabled_payment_types -%}

to this one,

{% assign enabled_payment_types = 'paypal,visa,master,american_express' | remove: ' ' | split: ',' %} 
{%- for type in enabled_payment_types -%}

Hey thanks for such beautiful solution. My shop is based in India and more than 60% sale is from Cash on Delivery so I want to add cash_on_delivery icon too with these icons. Plus I want many more icons such as UPI, Phonepe, etc. Please help me.

Here is my website URL www.smylco.in