Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Does anyone here know if it's possible to create a meta field that will auto-populate with a part of a product's name? We have thousands and thousands of items that we want to set up a custom sorting method for but it would take forever to edit each item to add in a custom metafield. I'm hoping we can create a meta field that will just pull the data it needs from part of the product's name. The part of the product name I want it to pull is within square brackets, like this "Product Name [Sub Name]".
Solved! Go to the solution
This is an accepted solution.
Can do this with Flow app:
This is an accepted solution.
Can do this with Flow app:
Hey Tim,
Thanks for replying. This looks great and I tested it out and it works pretty well but I'm hoping they there is a way to get it to tigger that doesn't require the status of the product updating. We have thousands of products so I'm trying to avoid needing do any part of this manually. Any thoughts?
Of course, the trigger in my flow is just an example.
Can use "Product added to the store", but then also would need to loop over existing products and update those, in a separate flow.
Say, you can have a flow which will run once, or daily, loop over products, skip ones with the metafields and update the rest.
If you have many products, this needs to be done carefully to not hit the limits.
Check https://help.shopify.com/en/manual/shopify-flow/advanced-workflows for further info.
Thanks again for your help so far Tim.
Do you know how I would get a Get Product Data pull to skip items that already have something in the metafield?
This flow I made currently works but it just pulls the same 100 items over and over. I tried to make a query to look for the metafield value but it did not work.
Yeah, you'd need an advanced query for this and I vaguely remember there was a problem with filtering by metafields, sorry not sure if it's still a problem, can't test right now.
However one workaround possible is to use tags for this purpose, say, select products without a tag, with query like tag_not:processed, process them and assign this tag...
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024