hi, thanks for the response, here is the code:
{%- liquid
assign per_row = section.settings.per_row
assign paginate_by = per_row | times: 5
if section.settings.collection_tags_style == 'inline' and collection.all_tags.size > 0
assign paginate_by = paginate_by | minus: 1
elsif section.settings.collection_subnav_style == 'inline'
assign paginate_by = paginate_by | minus: 1
endif
-%}
{%- paginate collection.products by paginate_by -%}
{%- if section.settings.collection_image_enable and collection.image -%}
{%- style -%}
.collection-hero {
height: {{ section.settings.collection_image_height }}px;
}
@media screen and (max-width: 768px) {
.collection-hero {
height: {{ section.settings.collection_image_height | times: 0.6 }}px;
}
}
{%- endstyle -%}
{%- if section.settings.parallax -%}
{%- else -%}
{%- assign img_url = collection.image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' -%}
{%- endif -%}
{%- endif -%}
{%- render 'breadcrumbs' -%}
{%- unless section.settings.collection_image_enable and collection.image -%}
{%- endunless -%}
{%- if section.settings.collection_tags_style == 'dropdown' or section.settings.collection_sort_enable -%}
{%- if section.settings.collection_tags_style == 'dropdown' -%}
{%- endif -%}
{%- if section.settings.collection_sort_enable -%}
{%- assign sort_by = collection.sort_by | default: collection.default_sort_by -%}
{%- endif -%}
{%- endif -%}
{%- if section.settings.description_position == 'top' -%}
{%- if collection.description != blank -%}
{{ collection.description }}
---
{%- endif -%}
{%- endif -%}
{%- liquid
assign grid_item_width = 'small--one-half medium-up--one-third'
case per_row
when 1
assign grid_item_width = ''
when 2
assign grid_item_width = 'medium-up--one-half'
when 3
assign grid_item_width = 'small--one-half medium-up--one-third'
when 4
assign grid_item_width = 'small--one-half medium-up--one-quarter'
when 5
assign grid_item_width = 'small--one-half medium-up--one-fifth'
endcase
assign have_sidebar = false
assign tag_count = 0
assign tag_limit = 7
assign have_extra_tags = false
-%}
{%- if section.settings.collection_tags_style == 'inline' -%}
{%- if collection.all_tags.size > 0 -%}
{%- endif -%}
{%- if current_tags contains tag or current_tags contains tag_with_hyphens -%}
- {{ tag | link_to_remove_tag: tag | replace: 'title=', 'class="js-no-transition" title=' | replace: 'view=ajax', '' }}
{%- else -%}
- {{ tag | link_to_tag: tag | replace: 'title=', 'class="js-no-transition" title=' | replace: 'view=ajax', '' }}
{%- endif -%}
{%- endfor -%}
{%- if have_extra_tags -%}
{%- endif -%}
{%- assign show_button_limit = tag_limit | minus: 1 -%}
{%- if tag_count > show_button_limit -%}
{%- endif -%}
{%- endif -%}
{%- elsif section.settings.collection_subnav_style == 'inline' -%}
{%- liquid
if linklists.main-menu.levels > 0
for link in linklists.main-menu.links
if link.active
if link.links.size > 0
assign have_sidebar = true
endif
elsif link.child_active
assign have_sidebar = true
endif
endfor
endif
-%}
{%- if have_sidebar -%}
{%- if linklists.main-menu.levels > 0 -%}
{%- for link in linklists.main-menu.links -%}
{%- if link.active -%}
{%- render 'subcollection-list', links: link.links -%}
{%- elsif link.child_active -%}
{%- for sub_link in link.links -%}
{%- if sub_link.active or sub_link.child_active -%}
{%- if sub_link.levels > 0 -%}
{%- render 'subcollection-list', links: sub_link.links -%}
{%- else -%}
{%- render 'subcollection-list', links: link.links -%}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endfor -%}
{%- if have_extra_tags -%}
{%- endif -%}
{%- endif -%}
{%- assign show_button_limit = tag_limit | minus: 1 -%}
{%- if tag_count > show_button_limit -%}
{%- endif -%}
{%- endif -%}
{%- endif -%}
{%- for product in collection.products -%}
{%- render 'product-grid-item'
product: product,
grid_item_width: grid_item_width,
per_row: per_row
-%}
{%- else -%}
{{ 'collections.general.no_matches' | t }}
{%- endfor -%}
{%- if paginate.pages > 1 -%}
{%- render 'pagination', paginate: paginate -%}
{%- endif -%}
{%- if settings.quick_shop_enable -%}
{%- for product in collection.products -%}
{%- render 'quick-shop-modal', product: product -%}
{%- endfor -%}
{%- endif -%}
{%- if section.settings.description_position == 'bottom' -%}
{%- if collection.description != blank -%}
---
{{ collection.description }}
{%- endif -%}
{%- endif -%}
{%- endpaginate -%}
{% schema %}
{
"name": "Collection pages",
"settings": [
{
"type": "checkbox",
"id": "collection_image_enable",
"label": "Show collection image",
"default": true
},
{
"type": "range",
"id": "collection_image_height",
"label": "Image height",
"default": 550,
"min": 350,
"max": 750,
"step": 100,
"unit": "px"
},
{
"type": "checkbox",
"id": "parallax",
"label": "Parallax image",
"default": true
},
{
"type": "select",
"id": "description_position",
"label": "Collection description position",
"default": "top",
"options": [
{
"value": "top",
"label": "Top of page"
},
{
"value": "bottom",
"label": "Bottom of page"
}
]
},
{
"type": "select",
"id": "collection_subnav_style",
"label": "Subnavigation style",
"default": "inline",
"options": [
{
"value": "none",
"label": "None"
},
{
"value": "inline",
"label": "Inline"
}
]
},
{
"type": "select",
"id": "collection_tags_style",
"label": "Tag filter style",
"default": "none",
"options": [
{
"value": "none",
"label": "None"
},
{
"value": "inline",
"label": "Inline"
},
{
"value": "dropdown",
"label": "Dropdown"
}
],
"info": "Only one option can use Inline style at a time"
},
{
"type": "checkbox",
"id": "collection_sort_enable",
"label": "Show sort options",
"default": false
},
{
"type": "header",
"content": "Products"
},
{
"type": "range",
"id": "per_row",
"label": "Products per row",
"default": 4,
"min": 1,
"max": 5,
"step": 1
},
{
"type": "checkbox",
"id": "mobile_flush_grid",
"label": "Flush grid on mobile",
"default": false
}
]
}
{% endschema %}