i am facing this error
Liquid error (templates/404 line 39): Array ‘collection.products’ is not paginateable.
{%- liquid
Determine the number of products per page
if cart.attributes.pagination != blank and cart.attributes.pagination
assign products_per_page = 2
else
assign products_per_page = 3
endif
-%}
{{ page_title }}
- Home
- {{ 'Shop Pages' }}
{%- paginate collection.products by products_per_page -%}
{% comment %} {{ collection.products | json }} {% endcomment %}
Showing 1–{{ collection.products_count }} of {{ collection.products_count }} results
{% comment %} {% endcomment %}
-
{% assign sort_by = collection.sort_by | default: collection.default_sort_by %}
- {{ option.name }} {% endfor %}
{% for option in collection.sort_options %}
{% comment %}
{{ 'Categories' }}
-
{% assign available_categories = collection.products | map: 'product.type' | compact | uniq %}
{% for product in collection.products %}
{{ product.type }}
{% endfor %}{{ 'Price' }}
-
{% assign price_ranges = collection.products | map: 'price' | compact | uniq | sort %}
- {{ range | money }} + {% else %}
- {{ range | money }} - {{ next_range | money }} {% endif %} {% endfor %}
{% for range in price_ranges %}
{% assign next_range = forloop.next | times: 10 %}
{% if forloop.last %}
{{ 'Prices' }}
-
{% assign available_prices = collection.products | map: 'price' | compact | uniq %}
- {{ price | money }} {% endfor %}
{% for price in available_prices %}
{{ 'Brands' }}
-
{% assign available_tags = collection.all_tags | compact | uniq %}
{% for tag in available_tags %}
- {{ tag }} {% endfor %}
{{ 'Colors' }}
-
{% assign available_colors = collection.products | map: 'variants' | map: 'option2' | compact | uniq %}
{% for color in available_colors %}
- {{ color }} {% endfor %}
{{ 'Sizes' }}
-
{% assign available_sizes = collection.products | map: 'variants' | map: 'option1' | compact | uniq %}
{% for size in available_sizes %}
- {{ size }} {% endfor %}
Color in URL: {{ request.params.color }}
{% if request.params.color == product_color %}{{ product.title }}
{{ product.price | money }} {% if product.compare_at_price > product.price %} {{ product.compare_at_price | money }} {% endif %}{{ product.description | truncate: 150 }}
{% comment %} {% comment %}
// {% endcomment %} {% endcomment %}