As I'm looping through a collection in Shopify, I want to add that product to another array of products so that I can loop through it again.
{% assign custom_products = '' %}
{% for product in collections['all'].products %}
{% assign custom_products = custom_products | append: product %}
{% endfor %}
But when I iterate through it again I get nothing
{% for product in custom_products %}
{% endfor %}
When I dump custom_products
I get ProductDropProductDropProductDropProductDrop...
and so on. Is this because I am constructing as a string? I want the second for
loop in the Liquid template to move through the products as if it were collections['all'].products
. Any ideas?