Is it possible to show all products from collection.template?

MarinaP
Tourist
7 0 1

I hope someone could help with this... Is it possible to show all products from another collection template? So, this is regular "call":

collections.all.url

And I'm trying to achieve something like this: 

collections.wholesale.all.url

Of course, that's not the right way. Thanks in advance!

0 Likes
MarinaP
Tourist
7 0 1

So.. I've found a way to do this. Hope this will help someone! 

   {%- for collection in collections -%}
      {% unless collection.products.count < 1 %}
         {% if collection.template_suffix contains 'wholesale' %} 
           {% for product in collection.products %}
               {% for variant in product.variants %}
                . . . . .  . . . . . . 
               {% endfor %}
            {% endfor %}
          {% endif %}
    {%  endfor %}

So I've made an empty collection 'wholesaleall' that actually represents collections.all.

0 Likes