Product Titles missing in collection pages

Morning all,

After lots of looking around i was hoping to get some information on why my product item titles have gone missing from the collection page, most likely its a code issues but was hoping this had happened to someone else and they had a fix for this.

Cheers Ben

https://agp.net.au/collections/food-packaging

@Benbox1

I have checked your shop but title code is block . Please share your sections/collections.liquid file code .

Thanks!

{%- comment -%}We start by creating a lot of useful variables !{%- endcomment -%}

{%- assign items_per_page = cart.attributes.collection_products_per_page | default: section.settings.default_products_per_page -%}

{%- assign has_visible_tags = false -%}

{%- if section.settings.show_filters -%}
{%- if section.settings.filter_type == ‘tag’ -%}
{%- for tag in collection.all_tags -%}
{%- unless tag contains ‘__’ -%}
{%- assign has_visible_tags = true -%}
{%- break -%}
{%- endunless -%}
{%- endfor -%}
{%- elsif section.settings.filter_type == ‘group’ -%}
{%- for tag in collection.all_tags -%}
{%- assign tag_parts = tag | split: ‘_’ -%}

{%- if tag_parts.size >= 2 -%}
{%- assign has_visible_tags = true -%}
{%- break -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endif -%}

{%- assign quick_links_menu = linklists[section.settings.quick_links] -%}

{%- if quick_links_menu.links.size > 0 or has_visible_tags -%}
{%- assign has_filters = true -%}
{%- else -%}
{%- assign has_filters = false -%}
{%- endif -%}

{%- if has_filters -%}
{%- capture grid_classes -%}1/3–tablet-and-up 1/{{ section.settings.products_per_row }}–desk{%- endcapture -%}
{%- else -%}
{%- capture grid_classes -%}1/3–tablet 1/{{ section.settings.products_per_row }}–lap-and-up{%- endcapture -%}
{%- endif -%}

{%- assign view_mode = cart.attributes.collection_layout | default: section.settings.default_view_layout -%}

{%- capture section_settings -%}
{
“currentSortBy”: {{ collection.sort_by | default: collection.default_sort_by | json }},
“currentTags”: [{% for tag in current_tags %}{{ tag | handle | json }}{% unless forloop.last %},{% endunless %}{% endfor %}],
“filterType”: {{ section.settings.filter_type | json }},
“defaultLayout”: {{ section.settings.default_view_layout | json }},
“defaultProductsPerPage”: {{ section.settings.default_products_per_page | json }},
“isAutomatic”: {% if collection.current_vendor != blank %}true{% else %}false{% endif %},
“gridClasses”: {{ grid_classes | json }}
}
{%- endcapture -%}

{% unless collection.handle == “your-collection-handle” %}

{{ product.price }}
{% endunless %}
  1. {{ 'general.breadcrumb.home' | t }} {%- render 'icon', icon: 'arrow-right' -%}
  2. {%- if current_tags -%} {%- if collection.handle == 'all' -%} {{- 'collection.general.all_products' | t -}} {%- else -%} {{- collection.title -}} {%- endif -%}

    {%- render ‘icon’, icon: ‘arrow-right’ -%}
    {%- else -%}

    {%- if collection.handle == ‘all’ -%}
    {{- ‘collection.general.all_products’ | t -}}
    {%- else -%}
    {{- collection.title -}}
    {%- endif -%}

    {%- endif -%}

  3. {%- if current_tags -%}

  4. {%- if section.settings.filter_type == 'tag' -%} {%- assign tag = current_tags.first -%} {%- elsif section.settings.filter_type == 'group' -%} {%- assign tag = current_tags.first | split: '_' | last -%} {%- endif -%}

    {{ tag | capitalize }}

  5. {%- endif -%}
{%- comment -%} -------------------------------------------------------------------------------------- FILTER BAR (DESKTOP) -------------------------------------------------------------------------------------- {%- endcomment -%}

{%- if has_filters -%}

{%- if quick_links_menu.links.size > 0 -%}

{{ quick_links_menu.title }}

{%- endif -%}

{%- if section.settings.show_filters and has_visible_tags -%}

{{ 'collection.filter.all' | t }}

{%- for tag in current_tags -%}
{% render 'icon', icon: 'close' %}

{%- if section.settings.filter_type == ‘group’ -%}
{{- tag | split: ‘_’ | last -}}
{%- else -%}
{{- tag -}}
{%- endif -%}

{%- endfor -%}

{%- if current_tags != blank and current_tags.size > 1 -%}
{{ ‘collection.filter.clear_all’ | t }}
{%- endif -%}

{%- if section.settings.filter_type == ‘tag’ -%}

    {%- for tag in collection.all_tags -%} {%- comment -%}Tags that start by two consecutive underscores (__) are used for internal purpose and must be removed from here{%- endcomment -%}

    {%- unless tag contains ‘__’ -%}

  • {% render 'icon', icon: 'check' %}

    {{ tag }}

  • {%- endunless -%} {%- endfor -%}
{%- elsif section.settings.filter_type == 'group' -%} {%- assign groups = '' -%}

{%- for tag in collection.all_tags -%}
{%- assign tag_parts = tag | split: ‘_’ -%}

{%- if tag_parts.size < 2 or tag contains ‘__’ -%}
{%- continue -%}
{%- endif -%}

{%- assign groups = groups | append: tag_parts.first | append: ‘,’ -%}
{% endfor %}

{%- assign color_label = ‘color,colour,couleur,cor,colore,farbe,색,色,カラー,färg,farve,szín,barva’ | split: ‘,’ -%}
{%- assign groups = groups | split: ‘,’ | compact | uniq -%}

{%- assign groups_order = section.settings.filter_group_order | downcase | strip | replace: ', ', ‘,’ | split: ‘,’ -%}

{%- for group in groups -%} {%- assign group_downcase = group | downcase -%}

{%- comment -%}
If we are within the special “brand” alternate template, then we do not show the “brand” or “vendor” group
{%- endcomment -%}

{%- if collection.template_suffix == ‘brand’ -%}
{%- assign brand_label = ‘brand,vendor,marque’ | split: ‘,’ -%}

{%- if brand_label contains group_downcase -%}
{%- continue -%}
{%- endif -%}
{%- endif -%}

{%- if color_label contains group_downcase and section.settings.show_filter_color_swatch -%}
{%- assign show_color_swatch = true -%}
{%- else -%}
{%- assign show_color_swatch = false -%}
{%- endif -%}

{%- assign has_active_tag_from_group = false -%}

{%- for tag in current_tags -%}
{%- assign current_tag_parts = tag | split: ‘_’ -%}
{%- assign current_tag_group_downcase = current_tag_parts.first | downcase -%}

{%- if group_downcase == current_tag_group_downcase -%}
{%- assign has_active_tag_from_group = true -%}
{%- break -%}
{%- endif -%}
{%- endfor -%}

{%- comment -%}If the group name belongs to the group order, we force this order by using flexbox{%- endcomment -%}

{%- assign current_group_order = 99 -%}

{%- if groups_order contains group_downcase -%}
{%- for group_order_name in groups_order -%}
{%- if group_order_name == group_downcase -%}
{%- assign current_group_order = forloop.index -%}
{%- break -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}

0 %}style="order: {{ current_group_order }}"{% endif %}> {%- capture link_id -%}filter-{% increment link_id %}{%- endcapture -%}

{%- assign is_collapsible_open = false -%}

{%- if has_active_tag_from_group or section.settings.open_group_filters_mode == ‘all_open’ -%}
{%- assign is_collapsible_open = true -%}
{%- elsif section.settings.open_group_filters_mode == ‘first_open’ -%}
{%- if groups_order.size > 0 -%}
{%- if current_group_order == 1 -%}
{%- assign is_collapsible_open = true -%}
{%- endif -%}
{%- elsif forloop.first -%}
{%- assign is_collapsible_open = true -%}
{%- endif -%}
{%- endif -%}

{{- group -}} {%- render 'icon', icon: 'arrow-bottom' -%}
{%- if show_color_swatch -%}
{%- for tag in collection.all_tags -%} {%- assign tag_parts = tag | split: '_' -%}

{%- if tag_parts.first != group or tag contains ‘__’ or tag_parts.size == 1 -%}
{%- continue -%}
{%- endif -%}

{%- assign downcased_value = tag_parts.last | downcase -%}
{%- capture color_id -%}filter-color-{% increment color_index %}{%- endcapture -%}

{%- assign color_swatch_name = tag_parts.last | handle | append: ‘.png’ -%}
{%- assign color_swatch_image = images[color_swatch_name] -%}

{%- endfor -%}
{%- else -%}
    {%- for tag in collection.all_tags -%} {%- assign tag_parts = tag | split: '_' -%}

    {%- if tag_parts.first != group or tag contains ‘__’ or tag_parts.size == 1 -%}
    {%- continue -%}
    {%- endif -%}

  • {% render 'icon', icon: 'check' %}

    {{ tag_parts.last }}

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

{%- paginate collection.products by items_per_page -%}

{%- unless collection.template_suffix == 'brand' -%} {%- if section.settings.show_collection_image and collection.image and collection.all_products_count > 0 -%} {%- if section.settings.collection_image_size == 'preserve_ratio' -%} {%- capture supported_sizes -%}{%- render 'image-size', sizes: '400,500,600,700,800,900,1000, 1200, 1400, 1600', image: collection.image -%}{%- endcapture -%} {%- assign image_url = collection.image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%}
{{ collection.image.alt | escape }}
{%- else -%}
{%- endif -%} {%- endif -%} {%- endunless -%}

{%- comment -%}

TOP PART (COLLECTION INFO + TOOLBAR)

{%- endcomment -%}

{%- if collection.all_products_count == 0 -%}

{{ collection.title }}

{{ 'collection.general.empty' | t }}

{%- else -%}
{%- comment -%} IMPLEMENTATION NOTE: unfortunately I was forced to add a lot of extra div (collection__meta, collection__meta-inner, collection__header-inner,...) to be able to accommodate with the brand related layout which make things more complicated... {%- endcomment -%}
{%- if section.settings.show_collection_image and collection.image and collection.all_products_count > 0 and collection.template_suffix == 'brand' -%}
{%- endif -%}
{%- if section.settings.show_collection_image and collection.image and collection.all_products_count > 0 and collection.template_suffix == 'brand' -%}
{%- endif -%}

{%- if collection.handle == 'all' -%} {{- 'collection.general.all_products' | t -}} {%- else -%} {{- collection.title -}} {%- endif -%}

{{ 'collection.general.products_count' | t: count: collection.all_products_count }}

{%- if collection.description != blank -%}
{%- assign allow_collapse_description = false -%}

{%- if section.settings.collapse_collection_description -%}
{%- assign allow_collapse_description = true -%}
{%- endif -%}

{{ collection.description }}

{%- if allow_collapse_description -%}


{{- ‘collection.general.view_more’ | t -}}

{%- endif -%}

{%- endif -%}
{%- if has_filters -%} {%- render 'icon', icon: 'filter' -%} {{ 'collection.filter.title' | t }}{% if current_tags.size > 0 %} ({{ current_tags | size }}){% endif %} {%- endif -%}
{%- assign offset = paginate.current_offset | plus: 1 -%} {%- assign page_size = paginate.current_offset | plus: paginate.page_size | at_most: paginate.items -%}

{{ ‘collection.general.showing_count’ | t: offset: offset, page_size: page_size, count: paginate.items }}

{{ 'collection.general.display' | t }}: {{ 'collection.general.page_size' | t: page_size: paginate.page_size }}{%- render 'icon', icon: 'arrow-bottom' -%}
{% render 'icon', icon: 'nav-triangle-borderless' %}
{{ 'collection.general.display' | t }} {% render 'icon', icon: 'close' %}
{{ 'collection.general.page_size' | t: page_size: 24 }} {% render 'icon', icon: 'check-2' %} {{ 'collection.general.page_size' | t: page_size: 36 }} {% render 'icon', icon: 'check-2' %} {{ 'collection.general.page_size' | t: page_size: 48 }} {% render 'icon', icon: 'check-2' %}
{%- assign collection_sort_by = collection.sort_by | default: collection.default_sort_by -%}

{%- for option in collection.sort_options -%}
{%- if option.value == collection_sort_by -%}
{%- assign collection_sort_by_name = option.name -%}
{%- break -%}
{%- endif -%}
{%- endfor -%}

{{ 'collection.sorting.title' | t }}{{ 'collection.sorting.title' | t }}: {{ collection_sort_by_name }}{%- render 'icon', icon: 'arrow-bottom' -%}
{% render 'icon', icon: 'nav-triangle-borderless' %}
{{ 'collection.sorting.title' | t }} {% render 'icon', icon: 'close' %}
{%- for option in collection.sort_options -%} {{ option.name }} {% render 'icon', icon: 'check-2' %} {%- endfor -%}
{{ 'collection.layout.title' | t }}

{%- if section.settings.default_view_layout == ‘grid’ -%}
{% render ‘icon’, icon: ‘grid’ %}
{% render ‘icon’, icon: ‘list’ %}
{%- else -%}
{% render ‘icon’, icon: ‘list’ %}
{% render ‘icon’, icon: ‘grid’ %}
{%- endif -%}

{%- comment -%}


MOBILE FILTERS

{%- endcomment -%}

{%- if has_filters and current_tags.size > 0 -%}

{%- for tag in current_tags -%} {% render 'icon', icon: 'close' %}

{%- if section.settings.filter_type == ‘group’ -%}
{{- tag | split: ‘_’ | last -}}
{%- else -%}
{{- tag -}}
{%- endif -%}

{%- endfor -%}

{%- if current_tags.size > 1 -%}
{{ ‘collection.filter.clear_all’ | t }}
{%- endif -%}

{{ ‘collection.general.results_count’ | t: count: collection.products_count }}

{%- endif -%}

{%- comment -%}

COLLECTION PRODUCTS

{%- endcomment -%}

{%- if collection.products_count == 0 -%}

{{ 'collection.general.no_results' | t }}

{{ 'collection.filter.clear_all' | t }}
{%- else -%} {%- if view_mode == 'grid' -%} {%- assign show_as_list = false -%} {%- else -%} {%- assign show_as_list = true -%} {%- endif -%}
{%- for product in collection.products -%} {%- render 'product-item', product: product, list: show_as_list, grid_classes: grid_classes -%} {%- endfor -%}

{%- render ‘pagination’, paginate: paginate -%}
{%- endif -%}

{%- endif -%}
{%- endpaginate -%}

{%- comment -%}


MOBILE FILTER SIDEBAR

Implementation note: the code is quite similar to the one that powers the desktop
navigation. Unfortunately there are some subtle differences that forced me to duplicate
a large part of the code :(.

{%- endcomment -%}

{%- if has_filters -%}

{%- render 'icon', icon: 'close' -%} {{ 'collection.filter.all' | t }} ({{ current_tags | size }})

<button class=“button button–transparent button–extra-small” data-action=“clear-tags” {% if current_tags == blank %}style=“display: none”{% endif %}>{{ ‘collection.filter.clear’ | t }}

{%- if quick_links_menu.links.size > 0 -%} {%- capture link_id -%}filter-{% increment link_id %}{%- endcapture -%}

{{ quick_links_menu.title }}

{{- 'collection.filter.select_category' | t -}} {%- render 'icon', icon: 'arrow-bottom' -%}
{%- endif -%}

{%- if has_visible_tags -%}

{{ 'collection.filter.all' | t }}

{%- if section.settings.filter_type == ‘tag’ -%}

    {%- for tag in collection.all_tags -%} {%- comment -%}Tags that start by two consecutive underscores (__) are used for internal purpose and must be removed from here{%- endcomment -%}

    {%- unless tag contains ‘__’ -%}

  • {% render 'icon', icon: 'check' %}

    {{ tag }}

  • {%- endunless -%} {%- endfor -%}
{%- elsif section.settings.filter_type == 'group' -%} {%- assign groups = '' -%}

{%- for tag in collection.all_tags -%}
{%- assign tag_parts = tag | split: ‘_’ -%}

{%- if tag_parts.size < 2 or tag contains ‘__’ -%}
{%- continue -%}
{%- endif -%}

{%- assign groups = groups | append: tag_parts.first | append: ‘,’ -%}
{%- endfor -%}

{%- assign color_label = ‘color,colour,couleur,cor,colore,farbe,색,色,カラー,färg,farve,szín,barva’ | split: ‘,’ -%}
{%- assign groups = groups | split: ‘,’ | compact | uniq -%}

{%- assign groups_order = section.settings.filter_group_order | downcase | strip | replace: ', ', ‘,’ | split: ‘,’ -%}

{%- for group in groups -%} {%- assign group_downcase = group | downcase -%}

{%- comment -%}
If we are within the special “brand” alternate template, then we do not show the “brand” or “vendor” group
{%- endcomment -%}

{%- if collection.template_suffix == ‘brand’ -%}
{%- assign brand_label = ‘brand,vendor,marque’ | split: ‘,’ -%}

{%- if brand_label contains group_downcase -%}
{%- continue -%}
{%- endif -%}
{%- endif -%}

{%- if color_label contains group_downcase and section.settings.show_filter_color_swatch -%}
{%- assign show_color_swatch = true -%}
{%- else -%}
{%- assign show_color_swatch = false -%}
{%- endif -%}

{%- assign has_active_tag_from_group = false -%}

{%- for tag in current_tags -%}
{%- assign current_tag_parts = tag | split: ‘_’ -%}
{%- assign current_tag_group_downcase = current_tag_parts.first | downcase -%}

{%- if group_downcase == current_tag_group_downcase -%}
{%- assign has_active_tag_from_group = true -%}
{%- break -%}
{%- endif -%}
{%- endfor -%}

{%- assign current_group_order = 99 -%}

{%- if groups_order contains group_downcase -%}
{%- for group_order_name in groups_order -%}
{%- if group_order_name == group_downcase -%}
{%- assign current_group_order = forloop.index -%}
{%- break -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}

0 %}style="order: {{ current_group_order }}"{% endif %}> {%- capture link_id -%}filter-{% increment link_id %}{%- endcapture -%}
{{- group -}} {{ current_tag_parts.last }}

{%- render ‘icon’, icon: ‘arrow-bottom’ -%}

{%- if show_color_swatch -%}
{%- for tag in collection.all_tags -%} {%- assign tag_parts = tag | split: '_' -%}

{%- if tag_parts.first != group or tag contains ‘__’ or tag_parts.size == 1 -%}
{%- continue -%}
{%- endif -%}

{%- assign downcased_value = tag_parts.last | downcase -%}
{%- capture color_id -%}filter-color-{% increment color_index %}{%- endcapture -%}

{%- assign color_swatch_name = tag_parts.last | handle | append: ‘.png’ -%}
{%- assign color_swatch_image = images[color_swatch_name] -%}

{{ tag_parts.last }}
{%- endfor -%}
{%- else -%}
    {%- for tag in collection.all_tags -%} {%- assign tag_parts = tag | split: '_' -%}

    {%- if tag_parts.first != group or tag contains ‘__’ or tag_parts.size == 1 -%}
    {%- continue -%}
    {%- endif -%}

  • {% render 'icon', icon: 'check' %}

    {{ tag_parts.last }}

  • {%- endfor -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%} {%- endif -%}
{{ 'collection.filter.view_results' | t }}
{%- endif -%}

{%- comment -%}

QUICK VIEW CONTAINER

{%- endcomment -%}

{%- render 'icon', icon: 'close' -%}
{%- render 'icon', icon: 'search-loader' -%}

{% schema %}
{
“name”: “Collection page”,
“settings”: [
{
“type”: “checkbox”,
“id”: “show_collection_image”,
“label”: “Show collection image”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “collapse_collection_description”,
“label”: “Collapse long description”,
“default”: false
},
{
“type”: “select”,
“id”: “collection_image_size”,
“label”: “Collection image size”,
“options”: [
{
“value”: “preserve_ratio”,
“label”: “Original image ratio”
},
{
“value”: “small”,
“label”: “Small”
},
{
“value”: “medium”,
“label”: “Medium”
},
{
“value”: “large”,
“label”: “Large”
}
],
“default”: “small”
},
{
“type”: “select”,
“id”: “products_per_row”,
“label”: “Products per row (desktop)”,
“options”: [
{
“value”: “3”,
“label”: “3”
},
{
“value”: “4”,
“label”: “4”
}
],
“default”: “4”
},
{
“type”: “range”,
“id”: “default_products_per_page”,
“label”: “Default products per page”,
“min”: 24,
“max”: 48,
“step”: 12,
“default”: 24
},
{
“type”: “select”,
“id”: “default_view_layout”,
“label”: “Default view layout”,
“options”: [
{
“value”: “grid”,
“label”: “Grid”
},
{
“value”: “list”,
“label”: “List”
}
],
“default”: “grid”
},
{
“type”: “select”,
“id”: “show_quick_buy”,
“label”: “Show quick buy on…”,
“options”: [
{
“value”: “list”,
“label”: “List view”
},
{
“value”: “list_grid”,
“label”: “List and grid views”
}
],
“default”: “list”
},
{
“type”: “select”,
“id”: “show_quick_view”,
“label”: “Show quick view on…”,
“options”: [
{
“value”: “list”,
“label”: “List view”
},
{
“value”: “list_grid”,
“label”: “List and grid views”
}
],
“default”: “list”
},
{
“type”: “header”,
“content”: “Sidebar”
},
{
“type”: “link_list”,
“id”: “quick_links”,
“label”: “Quick links”
},
{
“type”: “checkbox”,
“id”: “quick_links_show_products_count”,
“label”: “Show products count”,
“info”: “Only for collection links”,
“default”: true
},
{
“type”: “header”,
“content”: “Filtering”
},
{
“type”: “checkbox”,
“id”: “show_filters”,
“label”: “Show filters”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “show_filter_color_swatch”,
“label”: “Show filter color swatch”,
“info”: “Requires filter type "By group" to be selected.”,
“default”: true
},
{
“type”: “select”,
“id”: “filter_type”,
“label”: “Filter type”,
“info”: “Filters by group requires specific tag formatting. Learn more”,
“options”: [
{
“value”: “tag”,
“label”: “By tag”
},
{
“value”: “group”,
“label”: “By group”
}
],
“default”: “tag”
},
{
“type”: “select”,
“id”: “open_group_filters_mode”,
“label”: “Filter opening mode (desktop)”,
“options”: [
{
“value”: “all_closed”,
“label”: “All closed”
},
{
“value”: “all_open”,
“label”: “All open”
},
{
“value”: “first_open”,
“label”: “First open”
}
],
“default”: “all_closed”
},
{
“type”: “text”,
“id”: “filter_group_order”,
“label”: “Group order”,
“info”: “List items must be identical to the group name. If left empty, all groups will be displayed in alphabetical order. Example: Color, Brand, Size.”
}
]
}
{% endschema %}