adding Afterpay icon into footer (or other icons)

Highlighted
Tourist
4 0 5

This is to add in new icons or payment methods into your footer (if not included in the default shopify payment settings)

for this example i have used AfterPay

EDIT CODE

  1. Open up and find the footer.liquid found in your Customize theme code sections.
  2. then find one of your loaded payment options (ie visa) in the code script
  3. here you will notice a string of text like this:

{% assign payment_icons_available = ',amazon_payments,american_express,apple_pay,bitcoin,cirrus,dankort,diners_club,discover,dogecoin,dwolla,forbrugsforeningen,interac,jcb,litecoin,maestro,master,paypal,visa' | split: ',' %}

  • ADD IN TEXT: just ad in your text for the missing payment (in this case im using afterpay) so it now looks like this:

{% assign payment_icons_available = 'afterpay,amazon_payments,american_express,apple_pay,bitcoin,cirrus,dankort,diners_club,discover,dogecoin,dwolla,forbrugsforeningen,interac,jcb,litecoin,maestro,master,paypal,visa' | split: ',' %}

Now this is just the "code part" that will tell your footer menue what to do with the icons etc. You will also need to load the footer icon for your missing payment option next

IMAGE ICON

  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. To get your button on your site we are going to upload the social media icon image to your theme. Click the Assets folder to open it.
  4. Scroll down to and click the Add a new asset link.
  5. Choose the icons file on your computer and click Upload asset.
  6. Copy the source code - and put it aside into notepad or something (right click on the image displayed and click "copy source code"

ADJUST SOME MORE CODE

  1. Go back to your footer.liquid code and "find" "icon-fallback-text", and paste this code below the  {% endfor %} code,

   <li>

              <img src="yourURL"/>

            </li>   

  1. Delete the part between the quotes and paste the stored "source code" link your grabbed before
  • this will insert the image in the default size (which is sometimes huge)
    • i actually found it easier to "resave" and "re-upload" the logo at a reduced size - ie take a snapshop of your current footer icons and in paint or something resize your logo to the same one. You will have to delete and reupload to your assesets - and fix the pased URL code above to get the right sizing.

hopefully i have made sence (sorry is a bit of hacking and code from all over the place, i managed to sort of glue togheter).

 

 

4 Likes
Highlighted
Tourist
5 0 4

It worked... Thanks for sharing!

All I had to do though is Step 1 and upload my AfterPay logo in Settings/files, then apply the code.

<li>

<img src="yourURL"/>

</li>  

And add my image URL in the'youURL' and it worked. Took me a few goes to get the size and alignment of the image right, but it looks really good now.

If anyone has the Debut theme.

Enter the code above in footer.liquid

directly under - {% endfor %}:

 <li class="payment-icon">
 {%- assign icon_name = type | prepend: 'icon-' -%}
 {% include icon_name %}
 </li>
 {% endif %}
 {% endfor %}


 {start code here]

 <li>

<img src="yourURL"/>

</li>  

 

3 Likes
Highlighted
New Member
3 0 0

Fabulous!  Worked with Poli icon.  Thanks

0 Likes
Highlighted
New Member
1 0 0

Hi,

Thanks for the instructions. I have managed to include the logo in the footer of my theme, but it looks blurry compared to the other logos.

I uploaded it as a jpg, should it be a different file format? Your help will be much appreciated, thanks!Screen Shot 2019-02-18 at 11.44.15 AM.png

0 Likes
Highlighted
New Member
1 0 0

PNG typically looks better. 

0 Likes
Highlighted
New Member
2 0 1

Hi,

 

I am struggling to add afterpay icon. I have followed your step by step but it shows like a credit card as generic. 

I have then added the code for the icon and it is massive underneath all other icons.

Can you please help?

 

Cheers

1 Like
Highlighted
New Member
1 0 0

In the end I email the support team at shopify and they were able to fix it for me.  Maybe give that a try.  All the best.

0 Likes
Highlighted
New Member
1 0 1

thanks this was lit. ALL DONE.

1 Like
New Member
4 0 0

im using brooklyn theme, and i cannot find a list of existing payment icons... 

 

<footer class="site-footer small--text-center" role="contentinfo">
<div class="wrapper">

<div class="grid-uniform">

{% comment %}
Default to 1 footer column (copyright/powered_by/payment_types)
{% endcomment %}
{% assign num_footer_columns = 1 %}

{% comment %}
Create an extra menu column if link list has more than 5 links
{% endcomment %}
{% if linklists[section.settings.footer_link_list].links.size > 0 %}
{% comment %}
We have a Footer menu that isn't empty, we will need another column
{% endcomment %}
{% assign num_footer_columns = num_footer_columns | plus: 1 %}
{% assign extra_footer_linklist_column = false %}
{% assign footer_linklist_count = linklists[section.settings.footer_link_list].links.size %}
{% if footer_linklist_count > 5 %}
{% assign extra_footer_linklist_column = true %}
{% comment %}
We split the links so we'll need another column
{% endcomment %}
{% assign num_footer_columns = num_footer_columns | plus: 1 %}
{% endif %}
{% comment %}
If we have an odd amount of links, we need to show 1 more link in 1st column
{% endcomment %}
{% assign extra_link = footer_linklist_count | modulo: 2 %}
{% comment %}
We start with a 2nd column after first column is filled up.
{% endcomment %}
{% assign footer_linklist_split = footer_linklist_count | divided_by: 2 | plus: extra_link | plus: 1 %}
{% endif %}

{% comment %}
Determine whether there are social links
{% endcomment %}
{% assign footer_social_enable = false %}
{% if
settings.social_twitter_link != blank
or settings.social_facebook_link != blank
or settings.social_pinterest_link != blank
or settings.social_google_plus_link != blank
or settings.social_instagram_link != blank
or settings.social_tumblr_link != blank
or settings.social_youtube_link != blank
or settings.social_vimeo_link != blank
or settings.social_fancy_link != blank
or settings.social_snapchat_link != blank
%}
{% assign footer_social_enable = true %}
{% endif %}

{% comment %}
Calculate the number of footer columns shown. Default to 1.
{% endcomment %}
{% if footer_social_enable %}
{% assign num_footer_columns = num_footer_columns | plus: 1 %}
{% endif %}

{% case num_footer_columns %}
{% when 0 %}
{% when 1 %}
{% assign footer_column_width = '' %}
{% when 2 %}
{% assign footer_column_width = 'one-half small--one-whole' %}
{% when 3 %}
{% assign footer_column_width = 'one-third small--one-whole' %}
{% when 4 %}
{% assign footer_column_width = 'large--one-quarter medium--one-half' %}
{% endcase %}

{% if linklists[section.settings.footer_link_list].links.size > 0 %}
<div class="grid__item {{ footer_column_width }}">
<ul class="no-bullets site-footer__linklist">
{% for link in linklists[section.settings.footer_link_list].links %}

{% comment %}
Create a second column
{% endcomment %}
{% if extra_footer_linklist_column and forloop.index == footer_linklist_split %}
</ul>
</div>
<div class="grid__item {{ footer_column_width }}">
<ul class="no-bullets site-footer__linklist">
{% endif %}

<li><a href="{{ link.url }}">{{ link.title }}</a></li>

{% endfor %}
</ul>
</div>
{% endif %}

{% if footer_social_enable %}
<div class="grid__item {{ footer_column_width }}">
<ul class="no-bullets social-icons">
{% if settings.social_facebook_link != blank %}
<li>
<a href="{{ settings.social_facebook_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Facebook' }}">
<span class="icon icon-facebook" aria-hidden="true"></span>
Facebook
</a>
</li>
{% endif %}
{% if settings.social_twitter_link != blank %}
<li>
<a href="{{ settings.social_twitter_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Twitter' }}">
<span class="icon icon-twitter" aria-hidden="true"></span>
Twitter
</a>
</li>
{% endif %}
{% if settings.social_pinterest_link != blank %}
<li>
<a href="{{ settings.social_pinterest_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Pinterest' }}">
<span class="icon icon-pinterest" aria-hidden="true"></span>
Pinterest
</a>
</li>
{% endif %}
{% if settings.social_instagram_link != blank %}
<li>
<a href="{{ settings.social_instagram_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Instagram' }}">
<span class="icon icon-instagram" aria-hidden="true"></span>
Instagram
</a>
</li>
{% endif %}
{% if settings.social_snapchat_link != blank %}
<li>
<a href="{{ settings.social_snapchat_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Snapchat' }}">
<span class="icon icon-snapchat" aria-hidden="true"></span>
Snapchat
</a>
</li>
{% endif %}
{% if settings.social_google_plus_link != blank %}
<li>
<a href="{{ settings.social_google_plus_link | escape }}" rel="publisher" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Google Plus' }}">
<span class="icon icon-google_plus" aria-hidden="true"></span>
Google Plus
</a>
</li>
{% endif %}
{% if settings.social_tumblr_link != blank %}
<li>
<a href="{{ settings.social_tumblr_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Tumblr' }}">
<span class="icon icon-tumblr" aria-hidden="true"></span>
Tumblr
</a>
</li>
{% endif %}
{% if settings.social_youtube_link != blank %}
<li>
<a href="{{ settings.social_youtube_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'YouTube' }}">
<span class="icon icon-youtube" aria-hidden="true"></span>
YouTube
</a>
</li>
{% endif %}
{% if settings.social_vimeo_link != blank %}
<li>
<a href="{{ settings.social_vimeo_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Vimeo' }}">
<span class="icon icon-vimeo" aria-hidden="true"></span>
Vimeo
</a>
</li>
{% endif %}
{% if settings.social_fancy_link != blank %}
<li>
<a href="{{ settings.social_fancy_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Fancy' }}">
<span class="icon icon-fancy" aria-hidden="true"></span>
Fancy
</a>
</li>
{% endif %}
</ul>
</div>
{% endif %}

<div class="grid__item {{ footer_column_width }} {% if num_footer_columns == 1 %}text-center{% else %}large--text-right{% endif %}">
<p>&copy; {{ 'now' | date: '%Y' }}, {{ shop.name | link_to: routes.root_url }}<br>{{ powered_by_link }}</p>
{%- if section.settings.show_payment_icons -%}
{%- unless shop.enabled_payment_types == empty -%}
<span class="visually-hidden">{{ 'general.payment.method' | t }}</span>
<ul class="inline-list payment-icons">
{%- for type in shop.enabled_payment_types -%}
<li>
{{ type | payment_type_svg_tag: class: 'icon' }}
</li>
{%- endfor -%}
</ul>
{%- endunless -%}
{%- endif -%}
</div>
</div>

</div>
</footer>

 

{% schema %}
{
"name": {
"da": "Sidefod",
"de": "Fußzeile",
"en": "Footer",
"es": "Pie de página",
"fi": "Alatunniste",
"fr": "Pied de page",
"hi": "फुटर",
"it": "Footer",
"ja": "フッター",
"ko": "바닥글",
"ms": "Pengaki",
"nb": "Footer",
"nl": "Voettekst",
"pt-BR": "Rodapé",
"pt-PT": "Rodapé",
"sv": "Sidfot",
"th": "ส่วนท้าย",
"zh-CN": "页脚",
"zh-TW": "頁尾"
},
"settings": [
{
"type": "link_list",
"id": "footer_link_list",
"label": {
"da": "Sidefodsmenu",
"de": "Fußzeilenmenü",
"en": "Footer menu",
"es": "Menú inferior",
"fi": "Alatunniste-valikko",
"fr": "Menu pied de page",
"hi": "फुटर मेनू",
"it": "Menu footer",
"ja": "フッターメニュー",
"ko": "바닥글 메뉴",
"ms": "Menu kaki",
"nb": "Bunntekstmeny",
"nl": "Voettekstmenu",
"pt-BR": "Menu de rodapé",
"pt-PT": "Menu do rodapé",
"sv": "Sidfotsmeny",
"th": "เมนูส่วนท้าย",
"zh-CN": "页脚菜单",
"zh-TW": "頁尾選單"
},
"default": "footer"
},
{
"type": "checkbox",
"id": "show_payment_icons",
"label": {
"da": "Vis betalingsikoner",
"de": "Zahlungssymbole anzeigen",
"en": "Show payment icons",
"es": "Mostrar iconos de pago",
"fi": "Näytä maksukuvakkeet",
"fr": "Afficher les icônes de paiement",
"hi": "भुगतान आइकन दिखाएं",
"it": "Mostra le icone di pagamento",
"ja": "支払いアイコンを表示する",
"ko": "결제 아이콘 표시",
"ms": "Tunjukkan ikon pembayaran",
"nb": "Vis betalingsikoner",
"nl": "Betalingspictogrammen weergeven",
"pt-BR": "Exibir ícones de pagamento",
"pt-PT": "Mostrar ícones de pagamento",
"sv": "Visa betalningsikoner",
"th": "แสดงไอคอนการชำระเงิน",
"zh-CN": "显示付款图标",
"zh-TW": "顯示付款圖示"
},
"default": true
}
]
}
{% endschema %}

 

pls help?

0 Likes
Highlighted
Tourist
6 0 1

I have the same issue 

 

did u find a solution?

0 Likes