Personalized checkout and custom promotions with Shopify Scripts
Collection setting I have a metafield named child_collection_list which let user self define child collection to be show on collection page
from collection page I obtain it by
{% assign child_collection = collection.metafields.custom.child_collection_list %}
its value in string format
["gid://shopify/Collection/563659761","gid://shopify/Collection/563659794","gid://shopify/Collection/563659827"]
I split and reformat it in ID array
and use colections object to retrieve the data like {{ collections['563659761'].handle }}
but I meet the 1000 max result set limitation
is there have any direct method to retrieve the collection object by collection's handle or id from section liquid ??
Solved! Go to the solution
This is an accepted solution.
Hi @XavierTsang
You can use for loop to retrive collection Object, Check the below code
{% assign child_collection = collection.metafields.custom.child_collection_list.value %}
{% for collection in child_collection %}
{{ collection.title }}
{% endfor %}
This is an accepted solution.
Hi @XavierTsang
You can use for loop to retrive collection Object, Check the below code
{% assign child_collection = collection.metafields.custom.child_collection_list.value %}
{% for collection in child_collection %}
{{ collection.title }}
{% endfor %}
Thx for reply, I missing the .value can't return collection object
You're welcome @XavierTsang
To fetch collections object you need to pass .value in metafield
You can find more here: https://shopify.dev/docs/api/liquid/objects/metafield#metafield-value
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025