Adding cart button to header

mm81
New Member
2 0 1

Hi there, 

I'm currently using the Supply theme and removed my cart icon in the header a while ago and can't remember how to make it appear again. Below is my code for header.liquid. If someone can provide me with a code to put the cart icon on the right side of my header that would be great!! https://bcmedequip.com/ 

<header class="site-header" role="banner" data-section-id="{{ section.id }}" data-section-type="header-section">
<div class="wrapper">

<div class="grid--full">
<div class="grid-item large--one-half">
{% if request.page_type == 'index' %}
<h1 class="header-logo" itemscope itemtype="http://schema.org/Organization">
{% else %}
<div class="h1 header-logo" itemscope itemtype="http://schema.org/Organization">
{% endif %}
{% if section.settings.logo %}
{% capture image_size %}{{ section.settings.logo_max_width | escape }}x{% endcapture %}
{%- assign img_url = section.settings.logo | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%}
{% capture logo_alt %}{{ section.settings.logo.alt | default: shop.name }}{% endcapture %}
<a href="{{ routes.root_url }}" itemprop="url">
<div class="lazyload__image-wrapper no-js header-logo__image" style="max-width:{{ section.settings.logo_max_width }}px;">
<div style="padding-top:{{ 1 | divided_by: section.settings.logo.aspect_ratio | times: 100}}%;">
<img class="lazyload js"
data-src="{{ img_url }}"
data-widths="[180, 360, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]"
data-aspectratio="{{ section.settings.logo.aspect_ratio }}"
data-sizes="auto"
alt="{{ logo_alt | escape }}"
style="width:{{ section.settings.logo_max_width }}px;">
</div>
</div>
<noscript>
{% capture image_size %}{{ section.settings.logo_max_width | escape }}x{% endcapture %}
<img src="{{ section.settings.logo | img_url: image_size }}"
srcset="{{ section.settings.logo | img_url: image_size }} 1x, {{ section.settings.logo | img_url: image_size, scale: 2 }} 2x"
alt="{{ logo_alt | escape }}"
itemprop="logo"
style="max-width:{{ section.settings.logo_max_width }}px;">
</noscript>
</a>
{% else %}
<a href="{{ routes.root_url }}" itemprop="url">{{ shop.name }}</a>
{% endif %}
{% if request.page_type == 'index' %}
</h1>
{% else %}
</div>
{% endif %}
</div>

<div class="grid-item large--one-half text-center large--text-right">
{% if section.settings.show_announcement or shop.customer_accounts_enabled %}
<div class="site-header--text-links{% if section.settings.announcement_text == blank %} medium-down--hide{% endif %}">
{% if section.settings.show_announcement %}
{% if section.settings.announcement_link != blank %}
<a href="{{ section.settings.announcement_link }}">
{% endif %}

<p>{{ section.settings.announcement_text | escape }}</p>

{% if section.settings.announcement_link != blank %}
</a>
{% endif %}
{% endif %}

{% if shop.customer_accounts_enabled %}
<span class="site-header--meta-links medium-down--hide">
{% if customer %}
{% capture first_name %}<a href="{{ routes.account_url }}">{{ customer.first_name }}</a>{% endcapture %}
{{ 'layout.customer.logged_in_as_html' | t: first_name: first_name }} &middot; {{ 'layout.customer.log_out' | t | customer_logout_link }}
{% else %}
{{ 'layout.customer.sign_in' | t | customer_login_link }}
<span class="site-header--spacer">{{ 'layout.customer.or' | t }}</span>
{{ 'layout.customer.create_account' | t | customer_register_link }}
{% endif %}
</span>
{% endif %}
</div>

<br class="medium-down--hide">
{% endif %}

{% include 'search-bar' %}

{% comment %} Change on March 23, 2020 by Nate Y | Theme Specialist at Shopify {% endcomment %}
{% if section.settings.show_cart %}
<a href="{{ routes.cart_url }}" class="header-cart-btn cart-toggle">
<span class="icon icon-cart"></span>
{{ 'layout.cart.cart' | t }} <span class="cart-count cart-badge--desktop {% if cart.item_count == 0 %}hidden-count{% endif %}">{{ cart.item_count }}</span>
</a>
{% endif %}
</div>
</div>

</div>
</header>

<div id="mobileNavBar">
<div class="display-table-cell">
<button class="menu-toggle mobileNavBar-link" aria-controls="navBar" aria-expanded="false"><span class="icon icon-hamburger" aria-hidden="true"></span>{{ 'layout.navigation.mobile_menu' | t }}</button>
</div>
<div class="display-table-cell">
{% comment %} Change on March 23, 2020 by Nate Y | Theme Specialist at Shopify {% endcomment %}
{% if section.settings.show_cart %}
<a href="{{ routes.cart_url }}" class="cart-toggle mobileNavBar-link">
<span class="icon icon-cart"></span>
{{ 'layout.cart.cart' | t }} <span class="cart-count {% if cart.item_count == 0 %}hidden-count{% endif %}">{{ cart.item_count }}</span>
</a>
{% endif %}
</div>
</div>

<nav class="nav-bar" id="navBar" role="navigation">
<div class="wrapper">
{% include 'search-bar' %}
{% include 'mobile-nav' %}
{% include 'site-nav' %}
</div>
</nav>

 

{% schema %}
{
"name": {
"da": "Overskrift",
"de": "Titel",
"en": "Header",
"es": "Encabezado",
"fi": "Ylätunniste",
"fr": "En-tête",
"hi": "हैडर",
"it": "Header",
"ja": "ヘッダー",
"ko": "머리글",
"ms": "Pengepala",
"nb": "Header",
"nl": "Koptekst",
"pt-BR": "Cabeçalho",
"pt-PT": "Cabeçalho",
"sv": "Rubrik",
"th": "ส่วนหัว",
"zh-CN": "标头",
"zh-TW": "標頭"
},
"class": "header-section",
"settings": [
{
"type": "link_list",
"id": "menu",
"label": {
"da": "Menu",
"de": "Menü",
"en": "Menu",
"es": "Menú",
"fi": "Valikko",
"fr": "Menu",
"hi": "मेनू",
"it": "Menu",
"ja": "メニュー",
"ko": "메뉴",
"ms": "Menu",
"nb": "Meny",
"nl": "Menu",
"pt-BR": "Menu",
"pt-PT": "Menu",
"sv": "Meny",
"th": "เมนู",
"zh-CN": "菜单",
"zh-TW": "選單"
},
"default": "main-menu"
},
{
"type": "header",
"content": {
"da": "Logo",
"de": "Logo",
"en": "Logo",
"es": "Logotipo",
"fi": "Logo",
"fr": "Logo",
"hi": "लोगो",
"it": "Logo",
"ja": "ロゴ",
"ko": "로고",
"ms": "Logo",
"nb": "Logo",
"nl": "Logo",
"pt-BR": "Logotipo",
"pt-PT": "Logótipo",
"sv": "Logotyp",
"th": "โลโก้",
"zh-CN": "logo",
"zh-TW": "商標"
}
},
{
"type": "image_picker",
"id": "logo",
"label": {
"da": "Tilpasset logo",
"de": "Benutzerdefiniertes Logo",
"en": "Custom logo",
"es": "Logotipo personalizado",
"fi": "Mukautettu logo",
"fr": "Logo personnalisé",
"hi": "कस्टम लोगो",
"it": "Logo personalizzato",
"ja": "ロゴをカスタムする",
"ko": "사용자 지정 로고",
"ms": "Logo tersuai",
"nb": "Tilpasset logo",
"nl": "Aangepast logo",
"pt-BR": "Logotipo personalizado",
"pt-PT": "Logótipo personalizado",
"sv": "Anpassad logotyp",
"th": "โลโก้แบบกำหนดเอง",
"zh-CN": "自定义 logo",
"zh-TW": "自訂商標"
},
"info": {
"da": ".png med bredde på 400 px anbefales",
"de": "400px breite .png empfohlen",
"en": "400px wide .png recommended",
"es": "400px de ancho .png recomendado",
"fi": "200 px leveä .png suositeltu",
"fr": "400 px de largeur .png recommandé",
"hi": "400px चौड़ा .png अनुसंशा की गई",
"it": "Consigliato file .png con larghezza 400 pixel",
"ja": "400ピクセル幅.png推奨",
"ko": "400 픽셀 와이드 .png 권장",
"ms": "Lebar .png 400px dicadangkan",
"nb": ".png med bredde på 400 piksler anbefalt",
"nl": "400px breed .png aanbevolen",
"pt-BR": ".png com 400 px de largura recomendado",
"pt-PT": ".png com 400 px de largura recomendado",
"sv": "200px bred .png rekommenderade",
"th": "แนะนำ ความกว้าง 400px .png",
"zh-CN": "建议使用 400 px 宽的 .png",
"zh-TW": "400px wide .png建議"
}
},
{
"type": "text",
"id": "logo_max_width",
"label": {
"da": "Tilpasset logobredde",
"de": "Logobreite",
"en": "Custom logo width",
"es": "Ancho del logotipo personalizado",
"fi": "Mukautetun logon leveys",
"fr": "Largeur personnalisée du logo",
"hi": "कस्टम लोगो की चौड़ाई",
"it": "Larghezza logo personalizzato",
"ja": "ロゴの幅をカスタムする",
"ko": "사용자 지정 로고 폭",
"ms": "Lebar logo tersuai",
"nb": "Tilpasset logobredde",
"nl": "Aangepaste logo-breedte",
"pt-BR": "Largura do logotipo personalizado",
"pt-PT": "Largura de logótipo personalizada",
"sv": "Anpassad logotypsbredd",
"th": "ความกว้างของโลโก้ที่กำหนดเอง",
"zh-CN": "自定义 logo 宽度",
"zh-TW": "自訂商標寬度"
},
"default": {
"da": "305",
"de": "305",
"en": "305",
"es": "305",
"fi": "305",
"fr": "305",
"hi": "305",
"it": "305",
"ja": "305",
"ko": "305",
"ms": "305",
"nb": "305",
"nl": "305",
"pt-BR": "305",
"pt-PT": "305",
"sv": "305",
"th": "305",
"zh-CN": "305",
"zh-TW": "305"
}
},
{
"type": "header",
"content": {
"da": "Meddelelseslinje",
"de": "Ankündigungsbereich",
"en": "Announcement bar",
"es": "Barra de anuncios",
"fi": "Ilmoituspalkki",
"fr": "Barre d'annonces",
"hi": "घोषणा बार",
"it": "Barra degli annunci",
"ja": "告知バー",
"ko": "공지 표시줄",
"ms": "Bar pengumuman",
"nb": "Kunngjøringslinje",
"nl": "Aankondigingsbalk",
"pt-BR": "Barra de anúncios",
"pt-PT": "Barra de comunicado",
"sv": "Meddelandefält",
"th": "แถบประกาศ",
"zh-CN": "公告栏",
"zh-TW": "公告列"
}
},
{
"type": "checkbox",
"id": "show_announcement",
"label": {
"da": "Vis meddelelse",
"de": "Ankündigung anzeigen",
"en": "Show announcement",
"es": "Mostrar anuncio",
"fi": "Näytä ilmoitus",
"fr": "Afficher l'annonce",
"hi": "घोषणा डिखाएं",
"it": "Mostra annuncio",
"ja": "告知を表示する",
"ko": "공지 표시",
"ms": "Tunjukkan pengumuman",
"nb": "Vis kunngjøring",
"nl": "Aankondiging weergeven",
"pt-BR": "Exibir anúncio",
"pt-PT": "Mostrar comunicado",
"sv": "Visa tillkännagivande",
"th": "แสดงประกาศ",
"zh-CN": "显示公告",
"zh-TW": "顯示公告"
},
"default": false
},
{
"type": "text",
"id": "announcement_text",
"label": {
"da": "Tekst",
"de": "Text",
"en": "Text",
"es": "Texto",
"fi": "Teksti",
"fr": "Texte",
"hi": "टेक्स्ट",
"it": "Testo",
"ja": "テキスト",
"ko": "텍스트",
"ms": "Teks",
"nb": "Tekst",
"nl": "Tekst",
"pt-BR": "Texto",
"pt-PT": "Texto",
"sv": "Text",
"th": "ข้อความ",
"zh-CN": "文本",
"zh-TW": "文字"
},
"default": {
"da": "Meddel noget her",
"de": "Hier etwas ankündigen",
"en": "Announce something here",
"es": "Anuncia algo aquí",
"fi": "Ilmoita jotakin tässä",
"fr": "Annoncez quelque chose ici",
"hi": "यहां कुछ घोषित करें",
"it": "Annuncia qualcosa qui",
"ja": "ここで告知してください",
"ko": "여기에 공지하십시오",
"ms": "Mengumumkan sesuatu di sini",
"nb": "Kunngjør noe her",
"nl": "Kondig hier iets aan",
"pt-BR": "Anuncie algo aqui",
"pt-PT": "Anunciar algo aqui",
"sv": "Meddela något här",
"th": "ประกาศข้อความที่นี่",
"zh-CN": "在此处进行公告",
"zh-TW": "在此公告資訊"
}
},
{
"type": "url",
"id": "announcement_link",
"label": {
"da": "Link",
"de": "Link",
"en": "Link",
"es": "Enlace",
"fi": "Linkki",
"fr": "Lien",
"hi": "लिंक",
"it": "Link",
"ja": "リンク",
"ko": "링크",
"ms": "Pautan",
"nb": "Kobling",
"nl": "Link",
"pt-BR": "Link",
"pt-PT": "Ligação",
"sv": "Länk",
"th": "ลิงก์",
"zh-CN": "链接",
"zh-TW": "連結"
},
"info": {
"da": "Valgfri",
"de": "Optional",
"en": "Optional",
"es": "Opcional",
"fi": "Valinnainen",
"fr": "Facultatif",
"hi": "वैकल्पिक",
"it": "Facoltativo",
"ja": "オプション",
"ko": "선택 사항",
"ms": "Opsyenal",
"nb": "Valgfritt",
"nl": "Optioneel",
"pt-BR": "Opcional",
"pt-PT": "Opcional",
"sv": "Valfritt",
"th": "ไม่จำเป็น",
"zh-CN": "可选",
"zh-TW": "(選填)"
}
},
{
"type": "header",
"content": {
"en": "Custom settings"
}
},
{
"type": "checkbox",
"id": "show_cart",
"label": {
"en": "Show cart button"
},
"default": true
}
]
}
{% endschema %}

KetanKumar
Shopify Partner
19086 1994 7040

@mm81 

can you please just check your theme customization header section your cart is disable just enable then show 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Expert | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
0 Likes
mm81
New Member
2 0 1

It worked!! Thank you so much!

0 Likes