Remove product description in collection page

Tourist
6 0 2

This is my collection-template.liquid page code. I want to remove the product description on the collection page only. Example: http://prntscr.com/q7733s

Can someone let me know what code to replace or remove? Thank you for your help in advance!!

{% comment %}
** Collections - default view **
- Collection template
- Uses blocks
{% endcomment %}

{% if section.settings.featured_collection_image %}
  {% capture sizes %}100x,480x,765x,1400x,2048x{% endcapture %}
  {% assign sizes = sizes | split: ',' %}

  <header class="banner center page_banner dark-overlay-{{ section.settings.image_darken }}">
    <img
          {% if collection.image %}
            src="{{ collection.image | img_url: sizes.first }}"
            data-src="{{ collection.image | img_url: sizes.last }}"
          {%- elsif section.settings.image -%}
            src="{{ section.settings.image | img_url: sizes.first }}"
            data-src="{{ section.settings.image | img_url: sizes.last }}"
          {%- else %}
            src="{{ collection.products.first.featured_image | product_img_url: sizes.first }}"
            data-src="{{ collection.products.first.featured_image | product_img_url: sizes.last }}"
          {% endif %}
          alt="{{ collection.title | escape }}"
          class="lazyload {{ settings.image_loading_style }}"
          sizes="100vw"
          srcset="{%- for size in sizes -%}
                    {%- if collection.image -%}
                      {{ collection.image | img_url: size }}
                    {%- elsif section.settings.image -%}
                      {{ section.settings.image | img_url: size, format: 'pjpg' }}
                    {%- else -%}
                      {{ collection.products.first.featured_image | product_img_url: size }}
                    {%- endif -%}
                    {{ size | replace: "x", "w" }}{% unless forloop.last %},{% endunless %}
                  {%- endfor -%}
          " />
      {% if section.settings.display_collection_title %}
        <div class="caption captionOverlay--true">
          <h1 class="headline">{{ collection.title }}</h1>
        </div>
      {% endif %}
  </header>
{% endif %}

<a name="pagecontent" id="pagecontent"></a>

<div class="container">
  {% paginate collection.products by section.settings.pagination_limit %}
    <div class="clearfix breadcrumb-collection">
      {% if section.settings.collection_breadcrumb %}
        <div class="eight columns breadcrumb_text" itemscope itemtype="http://schema.org/BreadcrumbList">
          <span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="{{ shop.url }}" title="{{ shop.name | escape }}" itemprop="item" class="breadcrumb_link"><span itemprop="name">{{ 'general.breadcrumbs.home' | t }}</span></a><meta itemprop="position" content="1" /></span>
          <span class="breadcrumb-divider">/</span>
          <span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="/collections/{% if collection.handle != blank %}{{ collection.handle }}{% else %}all{% endif %}" title="{{ collection.title | escape }}" itemprop="item" class="breadcrumb_link"><span itemprop="name">{{ collection.title }}</span></a><meta itemprop="position" content="2" /></span>
          {% if current_tags %}
            {% for tag in current_tags %}

              {% unless tag contains 'meta-' %}
                <span class="breadcrumb-divider">/</span>
                <span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="/collections/{% if collection.handle != blank %}{{ collection.handle }}{% else %}all{% endif %}/{{ tag | handleize }}" title="{{ tag | escape }}" itemprop="item"><span itemprop="name">{{ tag }}</span></a><meta itemprop="position" content="{{ forloop.index | plus: 2 }}" /></span>
              {% endunless %}
            {% endfor %}
          {% endif %}

          {% if paginate.pages != 0 and settings.pagination_type != 'load_more' and settings.pagination_type != 'infinite_scroll' %}
            <span class="breadcrumb-divider">/</span> {{ 'general.breadcrumbs.page' | t: current_page: paginate.current_page, pages: paginate.pages }}
          {% endif %}
        </div>
      {% endif %}
    </div>
    <div class="section clearfix">
      {% if section.settings.display_collection_title and section.settings.featured_collection_image == false %}
        <div class="eight columns">
          <h1>{{ collection.title }}</h1>
        </div>
      {% endif %}
      <div class="eight columns section_select {% unless section.settings.display_collection_title and section.settings.featured_collection_image == false %}offset-by-eight{% endunless %}">
        {% if collection.handle != blank and collection.products_count > 0 %}
          {% if section.settings.collection_tags %}
            {% for tag in collection.all_tags %}
              {% if forloop.first %}
                <select name="tag_filter" id="tag_filter" class="tag_filter" data-default-collection="{% if collection.handle == 'all' %}/collections/all{% else %}{{ collection.url }}{% endif %}">
                  <option {% unless current_tags %}selected="selected"{% endunless %} value="{% if collection.handle == "all" %}/collections/all{% else %}{{ collection.url }}{% endif %}">{{ 'collections.general.all_collection_title' | t: title: collection.title }}</option>
              {% endif %}

              {% unless tag contains 'meta-' %}
                <option {% if current_tags contains tag %}selected="selected"{% endif %} value="/collections/{% if collection.handle != blank %}{{ collection.handle }}{% else %}all{% endif %}/{{ tag | handleize }}">{{ tag }}</option>
              {% endunless %}

              {% if forloop.last %}
                </select>
              {% endif %}
            {% endfor %}
          {% endif %}

         {% if section.settings.collection_sort %}
            <select class="sort_by" id="sort-by" data-default-sort="{{ collection.sort_by | default: collection.default_sort_by  }}">
              <option value="manual">{{ 'collections.sorting.featured' | t }}</option>
              <option value="best-selling">{{ 'collections.sorting.best_selling' | t }}</option>
              <option value="title-ascending">{{ 'collections.sorting.az' | t }}</option>
              <option value="title-descending">{{ 'collections.sorting.za' | t }}</option>
              <option value="price-ascending">{{ 'collections.sorting.price_ascending' | t }}</option>
              <option value="price-descending">{{ 'collections.sorting.price_descending' | t }}</option>
              <option value="created-descending">{{ 'collections.sorting.date_descending' | t }}</option>
              <option value="created-ascending">{{ 'collections.sorting.date_ascending' | t }}</option>
            </select>
          {% endif %}
        {% endif %}
      </div>
    </div>
    <div class="sixteen columns">
      <div class="feature_divider"></div>
    </div>


    {% comment %}Check to see if sidebar should be enabled{% endcomment %}
    {% if section.blocks.size > 0 %}
      {% assign sidebar = true %}
    {% else %}
      {% assign sidebar = false %}
    {% endif %}

    {% if sidebar %}
      {% include 'sidebar' %}
      <div class="twelve columns">
    {% else %}
      <div class="sixteen columns">
    {% endif %}

      {% if collection.description != blank %}
        <div class="section clearfix collection_description">
          {{ collection.description }}
        </div>
      {% endif %}

      {% if collection.products.size == 0 %}
        <div class="section clearfix collection-matrix">
          <p class="quote">{{ 'collections.general.no_matches' | t }}</p>
        </div>
      {% else %}
        {% assign products_per_row = section.settings.products_per_row %}
        {% include 'product-loop', sidebar: sidebar %}
      {% endif %}

    {% if settings.pagination_type == 'basic_pagination' %}
      {% include 'pagination' with sidebar %}
    {% endif %}

    </div>
  {% endpaginate %}

</div>

{% schema %}

{
  "name": "Collection",
  "class": "collection-template-section",
  "settings": [
    {
      "type": "range",
      "id": "products_per_row",
      "label": "Products per row",
      "min": 2,
      "max": 5,
      "step": 1,
      "default": 3
    },
    {
      "type": "range",
      "id": "pagination_limit",
      "label": "Products per page",
      "min": 2,
      "max": 50,
      "step": 1,
      "default": 48
    },
    {
      "type": "checkbox",
      "id": "display_collection_title",
      "label": "Show collection title"
    },
    {
      "type": "checkbox",
      "id": "collection_breadcrumb",
      "label": "Show breadcrumb links",
      "default": true
    },
    {
      "type": "checkbox",
      "id": "collection_tags",
      "label": "Enable filtering by product tag"
    },
    {
      "type": "checkbox",
      "id": "collection_sort",
      "label": "Enable collection sorting"
    },
    {
      "type": "header",
      "content": "Banner image"
    },
    {
      "type": "checkbox",
      "id": "featured_collection_image",
      "label": "Show top banner image",
      "info": "The collection's featured image will be used by default. Optionally upload a banner image as a fallback."
    },
    {
      "type": "image_picker",
      "id": "image",
      "label": "Banner image",
      "info": "1800 x 1000px recommended"
    },
    {
      "type": "checkbox",
      "id": "image_darken",
      "label": "Darken banner image",
      "default": false
    },
    {
      "type": "header",
      "content": "Sidebar"
    },
    {
      "type": "paragraph",
      "content": "Create a sidebar by adding content blocks."
    },
    {
      "type": "checkbox",
      "id": "toggle",
      "label": "Toggle sidebar content",
      "default": false
    }
  ],
  "blocks": [
    {
      "type": "filter_by_collection",
      "name": "Collection list",
      "limit": 1
    },
    {
      "type": "menu",
      "name": "Menu",
      "settings": [
        {
          "type": "link_list",
          "id": "custom_menu_linklist",
          "label": "Menu"
        }
      ]
    },
    {
      "type": "page",
      "name": "Page",
      "settings": [
        {
          "type": "page",
          "id": "content_page",
          "label": "Page"
        }
      ]
    },
    {
      "type": "recently_viewed",
      "name": "Recently viewed products",
      "limit": 1,
      "settings": [
        {
          "type": "paragraph",
          "content": "To test the recently viewed products, view your online store outside of the Editor and visit multiple product pages ([?](https:\/\/help.outofthesandbox.com\/hc\/en-us\/articles\/115008765228))"
        },
        {
          "type": "text",
          "id": "sidebar_rv_title",
          "label": "Title",
          "default": "Recently Viewed"
        },
        {
          "type": "range",
          "id": "sidebar_rv_per",
          "label": "Products limit",
          "min": 1,
          "max": 4,
          "step": 1,
          "default": 3
        }
      ]
    },
    {
      "type": "filter",
      "name": "Tag filter",
      "limit": 5,
      "settings": [
        {
          "type": "text",
          "id": "filter_name",
          "label": "Title"
        },
        {
          "type": "textarea",
          "id": "filter_tags",
          "label": "Filter tags",
          "info": "Add a comma-separated list of product tags. Only the tags found in the collection will be displayed as filters ([?](https://help.outofthesandbox.com/hc/en-us/articles/115008642047))"
        },
        {
          "type": "checkbox",
          "id": "enable_filter_swatches",
          "label": "Display color swatches"
        }
      ]
    },
    {
      "type": "filter_by_tag",
      "name": "Tag list",
      "limit": 1
    },
    {
      "type": "text",
      "name": "Text",
      "settings": [
        {
          "type": "text",
          "id": "title",
          "label": "Heading",
          "default": "Heading"
        },
        {
          "type": "richtext",
          "id": "text",
          "label": "Text",
          "default": "<p>Text area can be used for special announcements or general information.</p>"
        }
      ]
    },
    {
      "type": "filter_by_type",
      "name": "Type list",
      "limit": 1
    },
    {
      "type": "filter_by_vendor",
      "name": "Vendor list",
      "limit": 1
    }
  ]
}

{% endschema %}

 

 

1 Like
Highlighted
Shopify Partner
50 10 21

Hi tdrop!

I think your princess is in another castle! Try looking at the product-loop.liquid template instead - hopefully you'll see a reference to the description there?

Hope that helps!

Code 402 Inc - Ecommerce Consulting in Kitchener, Ontario, Canada
1 Like
Highlighted
Tourist
6 0 2

Thanks for the reply. Although I'm not seeing it in the template or maybe I'm just overlooking. Here's the template code. Thanks for your help again!

{% assign product_found = false %}
{% assign skip = false %}
{% assign collection_group = products | map: 'id' %}
{% assign collection_group_thumb = collection_group | append : 'thumb' %}
{% assign collection_group_mobile = collection_group | append : 'mobile' %}

{% if template contains 'collection' %}
  {% assign matrixType = 'collection-matrix' %}
{% elsif template contains 'search' %}
  {% assign matrixType = 'search-matrix' %}
{% endif %}

{% capture new_row %}
  {% comment %}
      <br class="clear product_clear" />
  {% endcomment %}
{% endcapture %}

<div itemtype="http://schema.org/ItemList" class="product-list {{ matrixType }} clearfix">
  {% for product in products limit: limit %}
    {% if product.id == skip_product.id or skip == true %}
      {% assign product_found = true %}
    {% else %}
      {% if forloop.rindex0 == 0 and product_found == false and forloop.length != products.count and template != 'search' and template != 'index' and type != 'block' %}
        {% assign skip = true %}
      {% else %}

        {% include 'product-thumbnail', sidebar: sidebar %}

        {% if products_per_row == 2 %}
          {% cycle collection_group: '', new_row %}
        {% elsif products_per_row == 3 %}
          {% cycle collection_group: '', '', new_row %}
        {% elsif products_per_row == 4 %}
          {% cycle collection_group: '', '', '', new_row %}
        {% elsif products_per_row == 5 %}
          {% cycle collection_group: '', '', '', '', new_row %}
        {% elsif products_per_row == 6 %}
          {% cycle collection_group: '', '', '', '', '', new_row %}
        {% elsif products_per_row == 7 %}
          {% cycle collection_group: '', '', '', '', '', '', new_row %}
        {% endif %}
      {% endif %}
    {% endif %}
  {% endfor %}
  {% if template contains 'collection' %}
    {% if settings.pagination_type == 'load_more' or settings.pagination_type == 'infinite_scroll' %}
      {% if paginate.next.url %}
        <div class="js-load-more load-more">
          <a href="{{ paginate.next.url }}" data-no-instant class="load-more__btn action_button continue-button">
            {% if template contains 'collection' %}
              {{ 'collections.general.load_more' | t }}
            {% elsif template contains 'search' %}
              {{ 'general.search.load_more' | t }}
            {% endif %}
          </a>
        </div>
      {% endif %}
    {% endif %}
  {% elsif template contains 'search' %}
    {% if settings.search_pagination_type == 'load_more' or settings.search_pagination_type == 'infinite_scroll' %}
      {% if paginate.next.url %}
        <div class="js-load-more load-more">
          <a href="{{ paginate.next.url }}" data-no-instant class="load-more__btn action_button continue-button">
            {% if template contains 'collection' %}
              {{ 'collections.general.load_more' | t }}
            {% elsif template contains 'search' %}
              {{ 'general.search.load_more' | t }}
            {% endif %}
          </a>
        </div>
      {% endif %}
    {% endif %}
  {% endif %}
</div>
<div class="load-more__icon"></div>
1 Like
Highlighted
Shopify Partner
50 10 21

You're making progress! Keep going -- looks like the product-thumbnail template may be the one with the actual details.

Code 402 Inc - Ecommerce Consulting in Kitchener, Ontario, Canada
0 Likes
Highlighted
Tourist
6 0 2

Still having trouble finding, thank you for your help honestly

{% assign opt2 = "" %}
{% for opt in product.options %}
{% capture option_index %}option{{ forloop.index }}{% endcapture %}
{% assign opt_values = product.variants | map: option_index | uniq %}
{% for item in opt_values %}

{% assign opt2 = opt2 | append: item | replace: ' ', '_' | append: ',' %}
{% endfor %}
{% endfor %}
{% assign opt2 = opt2 | replace: ',', ' ' | uniq %}

{% comment %}
<ul>
  {% for tt in opt2 %}
  {% assign variantt = tt | strip %}
  <li>{{ variantt }}</li>
  {% endfor %}
</ul>
{% endcomment %}

{% if sidebar %}
  <div class="product_div {{opt2}} {% if products_per_row == 2 %}six columns {% cycle collection_group_thumb: 'alpha', 'omega' %}{% elsif products_per_row == 3 %}four columns {% cycle collection_group_thumb: 'alpha', '', 'omega' %}{% elsif products_per_row == 4 %}three columns {% cycle collection_group_thumb: 'alpha', '', '', 'omega' %}{% else %}one-fifth-sidebar column {% cycle collection_group_thumb: 'alpha', '', '', '', 'omega' %}{% endif %} thumbnail {% cycle collection_group_mobile: 'even', 'odd' %}">
{% else %} 
  <div class="  
    {% if products_per_row == 2 %}
      eight columns {% cycle collection_group_thumb: 'alpha', 'omega' %}
    {% elsif products_per_row == 3 %}
      one-third column {% cycle collection_group_thumb: 'alpha', '', 'omega' %}
    {% elsif products_per_row == 4 %}
      four columns {% cycle collection_group_thumb: 'alpha', '', '', 'omega' %}
    {% elsif products_per_row == 5 %}
      one-fifth column {% cycle collection_group_thumb: 'alpha', '', '', '', 'omega' %}
    {% elsif products_per_row == 6 %}
      one-sixth column {% cycle collection_group_thumb: 'alpha', '', '', '', '', 'omega' %}
    {% else %}
      one-seventh column {% cycle collection_group_thumb: 'alpha', '', '', '', '', '', 'omega' %}
    {% endif %} thumbnail {% cycle collection_group_mobile: 'even', 'odd' %} test">
{% endif %}
  

  {% assign collection_handles = product.collections | map: 'handle' %}
  {% if product.featured_image.alt contains 'youtube' or image.alt contains 'vimeo' %}
    {% assign alt_text = product.title %}
  {% else %}
    {% assign alt_text = product.featured_image.alt %}
  {% endif %}

  {% if settings.align_height %}
    {% assign collection_height = settings.collection_height | plus: 0 %}
    {% assign product_aspect_ratio = product.featured_image.aspect_ratio | plus: 0 %}
    {% assign product_set_width = product_aspect_ratio | times: collection_height %}

    {% if product.featured_image.width >= product.featured_image.height %}
      {% assign align_height_value = 'width: 100%; height: auto;' %}
    {% else %}
      {% assign align_height_value = 'width: 100%;' %}
    {% endif %}

  {% endif %}
   
  <div class="product-wrap">
    <div class="relative product_image swap-{{ settings.collection_secondary_image }}">
      <a href="{{ product.url | within: collection }}" itemprop="url">
        <div class="image__container" style="{% if settings.align_height %} max-width: {{ product_set_width }}px; {% else %} max-width: {{- product.featured_image.width -}}px; {% endif %}">
          <img  src="{{ product.featured_image | product_img_url: '100x' }}"
                alt="{{ alt_text | escape }}"
                class="lazyload {{ settings.image_loading_style }}"
                style="{{ align_height_value }} max-width: {{- product.featured_image.width -}}px;"
                data-sizes="auto"
                data-src="{{ product.featured_image | product_img_url: '900x' }}"
                data-srcset=" {{ product.featured_image | product_img_url: '300x' }} 300w,
                              {{ product.featured_image | product_img_url: '400x' }} 400w,
                              {{ product.featured_image | product_img_url: '500x' }} 500w,
                              {{ product.featured_image | product_img_url: '600x' }} 600w,
                              {{ product.featured_image | product_img_url: '700x' }} 700w,
                              {{ product.featured_image | product_img_url: '800x' }} 800w,
                              {{ product.featured_image | product_img_url: '900x' }} 900w"
              />
            </div>
          {% if settings.collection_secondary_image != blank %}
            <div class="image__container" style="max-width: {% if product.images[1] != blank %}{{- product.images[1].width -}}px{% else %}{{- product.featured_image.width -}}px{% endif %}; ">
              <img src="{% if product.images[1] != blank %}{{ product.images[1] | product_img_url: '900x' }}{% else %}{{ product.featured_image | product_img_url: '900x' }}{% endif %}"
              class="secondary lazyload"
              alt="{{ alt_text | escape }}"
              />
            </div>
          {% endif %}
        </a>
      {% include "product-details" %}
    </div>
    <a class="product-info__caption {% if settings.thumbnail_hover_enabled %}hidden{% endif %}" href="{{ product.url | within: collection }}" itemprop="url">
      {% include "product-info" %}
    </a>
  </div>
{% include 'collection-swatch' %}
</div>
0 Likes
Highlighted
Shopify Partner
50 10 21

Hm, are you sure you included the correct template at the top of the discussion thread?

If you're comfortable sharing your store URL, I can send a collaborator request that would let me see your store's templates and give you more direct feedback.

Code 402 Inc - Ecommerce Consulting in Kitchener, Ontario, Canada
0 Likes