Metaobject "products list" field type limit

Metaobject "products list" field type limit

theSerialCoder
Shopify Partner
6 0 4

Hi everyone,

 

Here's the issue that I was struggling with:

 

Basically I have a Metaobject definition which has a field of type product (more specifically a list of products) that contains 58 products. The problem is that when I try to access all those products in Liquid I can see only the first 50, and that brings me to think that there is a limit of 50 products that can be added as list in a Metaobject. Is that right? I can't find anything about it and I searched in all Shopify's documentations. If that's the case I could suggest to specify it somewhere, otherwise it's hard to find the issue in case more than 50 products are needed in the mentioned field, since when I add the products from the Admin dedicated page it doesn't throw me any error or some kind of limitation. Also when I create the definition from the settings it's not specified that there's such a limit.
To give e better context of what I am talking about here it is some screens of the interested parts:

 

screen3.pngscreen1.pngscreen2.png

 

Thanks to all.

Replies 3 (3)

AHAY
Explorer
44 5 10

Not an an answer but rather a question about the display  (access of the field list of products in the theme). I have a meta object and a field of type "List of products" and  I'm struggling trying to display it in my custom section liquid for the custom meta object. I wonder how you managed to display the "eligible products" in your case and if you found any solution for the limit issue. Thank you

If you find my answer useful please do like/accept it so I feel more motivated to help in my spare time.
AHAY
Explorer
44 5 10

I figured out the proper way to access the field and display it, after re-reading the dev docs.
I still have to find a fix for the 50 products limit ! Thank you

If you find my answer useful please do like/accept it so I feel more motivated to help in my spare time.
theSerialCoder
Shopify Partner
6 0 4

Hi,

Sorry for the late answer, but I missed this messages.

Anyway, glad that you figured out how to access that data. Regarding the limit of 50 products, the only workaround that I found is using more than one instance of the same metaobject. So if for example you have a total of 58 products, you can create the first instance (called for example "Instance 1") and then create another one (for example "Instance 2") with same data but different products, so a list with 8 products, which is the number exceeding the 50 considering the total.
After that you can access both metaobjects in your code and treat the data as a single metaobject.
Hope that this helps!