Collection Page showing two price

Highlighted
New Member
11 0 0

Hello there -

 

I've messed up my collection page template and now it is showing the same price twice. One big and one small I want just the small one.

 

here is my code currently.

 

 

<div class="grid">
  <div class="grid-item col-5 medium-down--col-12">
    <h1>{{ collection.title }}</h1>
  </div>

  <div class="grid-item col-7 medium-down--col-12 large--text-right">
    {% if settings.show_bbt and collection.all_tags.size > 0 %}
    <div class="filter">
      <p>{{ settings.bbt_label }}</p>
      <select class="coll-filter" name="coll-filter" size="1">
        <option value="">All</option>
        {% for tag in collection.all_tags %}
        {% if current_tags contains tag %}
        <option value="{{ tag | handleize }}" selected>{{ tag }}</option>
        {% else %}
        <option value="{{ tag | handleize }}">{{ tag }}</option>
        {% endif %}
        {% endfor %}
      </select>
    </div>
    {% endif %}
    {% if settings.show_sb and collection.products_count > 1 %}
    <div class="filter">
      <p>{{ settings.sb_label }}</p>
      <select class="sort-by">
        <option value="manual">Featured</option>
        <option value="price-ascending">Price: Low to High</option>
        <option value="price-descending">Price: High to Low</option>
        <option value="title-ascending">A-Z</option>
        <option value="title-descending">Z-A</option>
        <option value="created-ascending">Oldest to Newest</option>
        <option value="created-descending">Newest to Oldest</option>
        <option value="best-selling">Best Selling</option>
      </select>
    </div>
    {% endif %}
  </div>

</div>

{% if collection.description.size > 0 %}
<div id="collection-description" class="rte">
  {{ collection.description }}
</div><!-- .collection-description rte -->
{% endif %}

{% if shop.products_count == 0 %}

  {% include 'snippet-default-products' %}

{% else %}


  <div id="#coll-product-list" class="grid-uniform product-list">
    {% for product in collection.products %}
      {% assign grid_item_width = 'large--col-3 medium--col-4 small--col-6' %}
      {% include 'snippet-product-item' %}
    {% endfor %}
  </div>

{% endif %}

{% include 'snippet-pagination' %}
{% include 'snippet-breadcrumbs' %}

{% endpaginate %}

<script>
  Shopify.queryParams = {};
  if (location.search.length) {
    for (var aKeyValue, i = 0, aCouples = location.search.substr(1).split('&'); i < aCouples.length; i++) {
      aKeyValue = aCouples[i].split('=');
      if (aKeyValue.length > 1) {
        Shopify.queryParams[decodeURIComponent(aKeyValue[0])] = decodeURIComponent(aKeyValue[1]);
      }
    }
  }
  var collFilters = jQuery('.coll-filter');
  collFilters.change(function() {
      var newTags = [];
      var newURL = '';
      delete Shopify.queryParams.page;
      collFilters.each(function() {
        if (jQuery(this).val()) {
          newTags.push(jQuery(this).val());
        }
      });
      {% if collection.handle %}
      newURL = '/collections/' + '{{ collection.handle }}';
      if (newTags.length) {
        newURL += '/' + newTags.join('+');
      }
      var search = jQuery.param(Shopify.queryParams);
      if (search.length) {
        newURL += '?' + search;
      }
      location.href = newURL;
      {% else %}
      if (newTags.length) {
        Shopify.queryParams.constraint = newTags.join('+');
      }
      else {
        delete Shopify.queryParams.constraint;
      }
      location.search = jQuery.param(Shopify.queryParams).replace(/\+/g, '%20');
      {% endif %}
  });
  jQuery('.sort-by')
    .val('{{ collection.sort_by | default: collection.default_sort_by  }}')
    .on('change', function() {
      Shopify.queryParams.sort_by = jQuery(this).val();
      location.search = jQuery.param(Shopify.queryParams).replace(/\+/g, '%20');
    });
</script>

 

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
289 0 218

Hey Carly,

Lots of custom work floating around in your theme! The culprit is line 56 of snippet-product-item.liquid . That 56 is generating the duplicate text, and commenting it out should clear that right up.

Hope that helps :)

0 Likes
Highlighted
Astronaut
1890 1 410

If you're unsure what to change, you may want to paste the code for snippet-product-item.liquid.

0 Likes