Adding Klarna payment icon to Showcase theme footer section

Hi,

I’m trying to add Klarnas payment icon to our footer in the Showcase theme after it was removed due to an update in the integration. Anyone out there that can help?

In Klarna docs they have added an example code, but where to place it in the code?

{% assign enabled_payment_types = ‘paymenttype1,paymenttype2,klarna’ | remove: ’ ’ | split: ‘,’ %}

Thanks in advance,

Kind regards

Hi @MPOPernille ,

  1. From your Shopify admin, go to Online Store > Themes.

  2. Find the theme you want to edit, and then click Actions > Edit code.

  3. In the Sections directory, click footer.liquid. If your theme doesn’t include this file, then click theme.liquid in the Layout directory.

  4. Find the following code in the file:

{% for type in shop.enabled_payment_types %}

Replace it with:

{% assign enabled_payment_types = 'paymenttype1,paymenttype2,klarna' | remove: ' ' | split: ',' %}
{% for type in enabled_payment_types %}

In the code that you just pasted, there is a list of payment providers separated by commas: paymenttype1,paymenttype2,klarna. The payment providers that you include in this list will determine which payment icons display on your online store. You can edit the list of payment providers to suit your needs.

The values that you can use are listed below:

  • afterpay - american_express - apple_pay - bitcoin - dankort - diners_club - discover - dogecoin - dwolla - facebook_pay - forbrugsforeningen - google_pay - ideal - jcb - klarna - klarna-pay-later - litecoin - maestro - master - paypal - shopify_pay - sofort - visa

For more information, please refer to this Shopify guide.

I hope it helps

1 Like

It worked like magic! Thank you so much! :grin:

Hi! I tried the same, but then only the klarna payment icon was displayed and the other payment icons disappeared. I have prestige theme. Could you please help?

Dear AvadaCommerce,

I have used your manual several times when updating my SHopify store with the highlight theme and it has always worked - until now.

Now it seems that they have made some changes to the code, which results in me not being able to fint the field with

{% for type in shop.enabled_payment_types %}

which results in me not being able to replace the code you’ve provided.

Do you have suggestion for what to do? I am in need!

See screenshot of current code:

{%- liquid 
            unless section.settings.only_show_custom_icons
              for type in shop.enabled_payment_types
                echo type | payment_type_svg_tag: class: 'payment-icon'
              endfor
            endunless
          -%}

          {%- if section.settings.icon_1 -%}
            
          {%- endif -%}
          
          {%- if section.settings.icon_2 -%}
            
          {%- endif -%}

The code I have always placed in, is the following:

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

In advance - thank you for helping out.

Warm regards,

Kristian