Use the following code to get list of those products that have more than 1 variants:
<!-- Remove this code immediately after getting required links -->
<ul class="productswithvariants" style="display:none;">
{% paginate collections.all.products by 1000 %}
{% for product in collections.all.products %}
{% if product.variants.size > 1 %}
<li>
<a href="{{ product.url }}" target="_blank">{{ product.title }}</a>
<a href="/admin/products/{{ product.id }}"><u> Admin View</u></a>
</li>
{% endif %}
{% endfor %}{% endpaginate %}
</ul>
<!-- Code End: Find products having variants -->
Comments
0 comments
Please sign in to leave a comment.