I was trying to display all the product types of my site in one page , 2 days back it was listing all the all the product type.
But now when that page is loads its giving error like "shopify Liquid error: Memory limits exceeded"
Here is my code
<div class="rte">
{{ page.content }}
<ul class="vendor-list block-grid three-up mobile one-up">
{% for product_type in shop.types %}
{% assign its_a_match = false %}
{% capture my_collection_handle %} {{ type | handleize | strip | escape }} {% endcapture %}
{% assign my_collection_handle_stripped = my_collection_handle | strip | escape %}
{% for collection in collections %}
{% if my_collection_handle_stripped == collection.handle %}
{% assign its_a_match = true %}
{% endif %}
{% endfor %}
{% if its_a_match %}
<li class="vendor-list-item"><a href="/collections/{{ product_type | handleize }}">{{ product_type }}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
how can i overcome this problem ?
forloop
. Either they are nested inside each other doesn't matter. Try a different logic for your requirement. – HymnZzyshop.types * collections
can result 40000. Check math and let me know. – HymnZzytype
in{{ type | handleize | strip | escape }}
? Do you meanproduct_type
? – HymnZzy