Calling in a product collection with AJAX using the following:
{% layout none %}
{% paginate collection.products by 50 %}
{
[{% for product in collection.products %}
{
"available": {{ product.available }},
"title": "{{ product.title }}",
"vendor": "{{ product.vendor }}"
}{% unless forloop.last %},{% endunless %}{% endfor %}
]
}
{% endpaginate %}
As well as rendering the collection-filters.liquid file:
When selecting a filter, the page reloads. Is there any way in the code to have it so when a filter is selected, the products will update and the page will not reload?
Any help is appreciated. Thank you.