I want solution for remove pagination option (view all ) across website and enable infinity scrolling for product collections
i use maker themes
please help.
Hello @BeningLuxury ,
You can go with an app
many more you can find in app store.
For custom solution you can follow this.
Thanks
Hai @Guleria , thanks for reply , i try to follow the solutions but still not work.
this list-collection.liquid
{%- liquid
assign view_more_t = 'collections.view_more' | t
assign alt_color = false
assign apply_overlay = false
assign aspect_ratio = section.settings.aspect-ratio
assign block_heading_font = 'block-heading'
assign container_width = section.settings.container-width
assign heading = section.settings.heading
assign hover_enabled = false
assign image_type = section.settings.image-type
assign mobile_overlay = section.settings.mobile-overlay
assign mobile_width = section.settings.mobile-width
assign spacing = section.settings.spacing
assign spacing_above = section.settings.spacing-above
assign spacing_below = section.settings.spacing-below
assign text_style = section.settings.text-style
assign view = section.settings.view
assign width = section.settings.width
assign collection_list = section.settings.collection-list
if collection_list == blank
assign collection_list = collections
endif
case text_style
when 'light'
assign alt_color = true
when 'light-with-overlay'
assign alt_color = true
assign apply_overlay = true
when 'box'
assign show_text_background = true
assign block_heading_font = 'paragraph'
when 'hover'
assign hover_enabled = true
assign mobile_overlay = false
endcase
-%}
{%- paginate collections by 48 -%}
{%- case view -%}
{%- when 'collection-thumbnails' -%}
{%- if heading != blank -%}
##
{{- heading -}}
{%- endif -%}
{%- for collection in collection_list -%}
{%- liquid
assign no_product_images = true
if collection.image and image_type == 'collection'
render "image", image: collection.image
elsif collection.products.length > 0
for product in collection.products
if product.featured_media.preview_image
render "image", image: product.featured_media.preview_image
assign no_product_images = false
break
endif
endfor
if no_product_images
render "placeholder", type: "collection", aspect_ratio: 1, placeholder_index: 1
endif
else
render "placeholder", type: "collection", aspect_ratio: 1, placeholder_index: 1
endif
-%}
###
{{- collection.title -}}
{%- endfor -%}
{%- if paginate.pages > 1 -%}
{%- render 'pagination', paginate: paginate -%}
{%- endif -%}
{%- when 'expanded-product-list' -%}
{%- render 'section-assets', name: 'list-collections', type: 'style' -%}
{%- for collection in collection_list -%}
##
{{- collection.title -}}
{%- liquid
for product in collection.products limit: 8
render 'product--item', product: product, section_id: section.id
endfor
-%}
{%- if collection.products.size > 8 -%}
{{- view_more_t -}}
{%- endif -%}
{%- endfor -%}
{%- if paginate.pages > 1 -%}
{%- render 'pagination', paginate: paginate -%}
{%- endif -%}
{%- endcase -%}
{%- endpaginate -%}
{% schema %}
{
"name": "Collections list",
"settings": [
{
"type": "header",
"content": "Style and layout"
},
{
"label": "View",
"id": "view",
"type": "radio",
"options": [
{ "value": "collection-thumbnails", "label": "Collection thumbnails" },
{ "value": "expanded-product-list", "label": "Expanded product list" }
],
"default": "collection-thumbnails"
},
{
"id": "spacing-above",
"label": "Spacing above",
"type": "checkbox",
"default": true
},
{
"id": "spacing-below",
"label": "Spacing below",
"type": "checkbox",
"default": true
},
{
"type": "header",
"content": "Content"
},
{
"type": "collection_list",
"id": "collection-list",
"label": "Collections"
},
{
"type": "header",
"content": "Collection thumbnail view"
},
{
"id": "heading",
"label": "Heading",
"type": "text",
"default": "Collections"
},
{
"id": "aspect-ratio",
"label": "Image size",
"type": "select",
"options": [
{ "label": "Natural", "value": "natural" },
{ "label": "Square (1:1)", "value": "square" },
{ "label": "Landscape (4:3)", "value": "landscape" },
{ "label": "Portrait (2:3)", "value": "portrait" }
],
"default": "square"
},
{
"label": "Thumbnail",
"id": "image-type",
"type": "radio",
"options": [
{ "value": "collection", "label": "Collection image" },
{ "value": "product", "label": "Product image" }
],
"default": "product",
"info": "Product image chooses first available product image in collection."
},
{
"label": "Text style",
"id": "text-style",
"type": "select",
"options": [
{ "label": "Light", "value": "light" },
{ "label": "Light, darken image", "value": "light-with-overlay" },
{ "label": "Box around text", "value": "box" },
{ "label": "Show on hover", "value": "hover" }
],
"default": "light-with-overlay",
"info": "Darkening the image can enhance text visibility"
},
{
"id": "spacing",
"label": "Show spacing between blocks",
"type": "checkbox",
"default": true
},
{
"id": "mobile-overlay",
"label": "Overlay text on small devices",
"type": "checkbox",
"default": true,
"info": "Not applicable for Show on hover text style."
},
{
"id": "container-width",
"label": "Maximum width of container",
"type": "range",
"min": 1,
"max": 6,
"step": 1,
"default": 4
},
{
"id": "width",
"label": "Blocks per row",
"type": "range",
"min": 2,
"max": 6,
"step": 1,
"default": 4
},
{
"id": "mobile-width",
"label": "Blocks per row for small devices",
"type": "radio",
"options": [
{ "value": "1", "label": "1" },
{ "value": "2", "label": "2" }
],
"default": "2"
}
]
}
{% endschema %}