All things Shopify and commerce
I'm attempting to create a Flow that's triggered by a product added to store, checks for a color tag such as "primary-black", then updates the metadata of that product to Black.
I created a color metaobject that utilizes a title, hexcode, and .jpg when included.
I used the method that is described in the attached video starting at 6.45.
Thanks, I had to adjust the code with a little to get Flow to not throw an error (I'm no coder, had to do a bit of research). Unfortunately, even after Flow accepted the code, after running it I get this error, "Got error updating metafield: "Value can't be blank." For value: "\n\n", Type: list.metaobject_reference".
Here's the updated code:
{% if product.tags == "primary-black" %}
{{ product.tags | replace: "primary-", "" }}
{% endif %}
{% assign product.metadata.color = "Black" %}
Should I be adding each detail from this metaobject; the color name, the hexcode, and whether or not there's a jpg?
You generally can't set metafields to an empty value.
Hey 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, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024