Get all metafields for products

Shopify Expert
3943 16 330

It's easy to play a numbers game, but you know what will happen. Some joker will figure out that with the owner resource and namespace, they can jam 100, 500, heck even 1000+ things on another resource. So what is the point? You can ask for your metafields, and if you have 2 or 3 or 7 or some modest number sure, it's a simple join, la-dee-da, off we go. But you know people will abuse this. And so you are just offloading poor performance from one area to another. And granted, it may bridge certain gaps, it will almost certainly bog down others. 

Don't forget, peoplez can writez terrible codez if you let them, and flush Shopify internal performance down the drain, and so the wiring for this has to be done carefully... so ya.. it's a nice thought experiment.. but not realistic for reasons probably due to DB structure, and SQL efficiency, and the like.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Shopify Expert
9807 91 1558

Joel - why does 10 minutes matter? It's not like you're sitting there processing them by hand. Can you explain the pain point you're seeing? If this thread is going to keep being revived I'd like to at least understand the context / reasons / pain etc.

If you are grabbing that content all the time why not just cache that on your end and save the call entirely?

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Shopify Partner
660 0 109

I must say I don't always understand why many people seem to very often push back on feature requests.

This is just that, a feature request.

I don't expect Shopify to implement all of them. I trust they have the intelligence and  inside knowledge to prioritize the various requests based on the number of people asking for it, complexity of implementation, risk, peformance, etc... If they don't implement it that is fine, but are we allowed to at least express that we would like some enhancement?

Yes the work around is acceptable, but why wouldn't we strive for better? Again I don't expect Shopify to implement all requests, but it seems to me they are the one that have the knowledge to priortize. One important input is the number of people requesting it in the forums.

IMO Jamie's answer was good enough, but +1 are ok.

I really wish that Shopify would use something like uservoice to keep track feature requests.

Something like Xero does: https://xero.uservoice.com/forums/5528-xero-accounting-api

Regarding the question at hand, my own context is that I want to generate a large report that shows some metafields.

1 Like
Shopify Expert
9807 91 1558

My comments are not push back, though I do like more info on the whys.
Context is important and this thread is seen internally.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Shopify Partner
108 2 13

I cache the retrieved data once it's received so the call doesn't go out often.  However should the shop owner wish to resync their product data manually then it's a 10 minute wait while everything is re-cached.

For now to get around this long wait time I'm just storing all custom meta data on my end and skipping Shopify's metafields.

I can see HunkyBill's point that should the feature be introduced it could have a negative impact on Shopify as people might cram all their misc data into metafields.

Co-Founder / CTO @ Intuitive Shipping
Intuitive Shipping | Automate Shipping Profiles
0 Likes
Shopify Expert
9807 91 1558

However should the shop owner wish to resync their product data manually then it's a 10 minute wait while everything is re-cached.

If you're storing the product updated_at value you can use that as an early indicator if you even need to sync a product or not. If it matches your last cache time you know the metafields haven't changed. May save you a call or two.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
0 Likes
Shopify Partner
108 2 13

Good point, thanks.

Co-Founder / CTO @ Intuitive Shipping
Intuitive Shipping | Automate Shipping Profiles
0 Likes
New Member
5 0 0

Problem will never be solved because developers doesn't understand why other CMS have SKU by default in main table (like product id and product name). Attributes (include features and combinations) alwais contained in other tables but product SKU available as main field any time.
We have simple behaviour: user create new product. Fill all data one time. And next time just search product by SKU to update price and quantity.
We can't cache data because if user change something directly in shop: data from cache will lie and user will have invalid data.
Also local cache means that customer must write functional identical to your CMS and backend to it. There is no need to buy CMS if you must develop new CMS just to work with CMS.
Your CMS is not the first CMS with which we work and we know these problems.

 

0 Likes
New Member
5 0 0

Problem will never be solved because developers doesn't understand why other CMS have SKU by default in main table (like product id and product name). Attributes (include features and combinations) alwais contained in other tables but product SKU available as main field any time.
We have simple behaviour: user create new product. Fill all data one time. And next time just search product by SKU to update price and quantity.
We can't cache data because if user change something directly in shop: data from cache will lie and user will have invalid data.
Also local cache means that customer must write functional identical to your CMS and backend to it. There is no need to buy CMS if you must develop new CMS just to work with CMS.
Your CMS is not the first CMS with which we work and we know these problems.

0 Likes
Excursionist
39 0 6

Initially I also wanted to get metafields with a call to products.json, but after read all replies here, I changed my mind :)

+1 HunkyBill 

Keep your customers informed with the best deals, sales events, announcements... https://apps.shopify.com/sticky-promo-bar
0 Likes