Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
I'm updating an order metafield from product metafields...
this code works - however it returns all the old metafield values and not just the current value
{% for lineItems_item in order.lineItems %}
{% for metafields_item in lineItems_item.product.metafields %}
{% if metafields_item.key == 'eta' %}
{{lineItems_item.name}} - {{metafields_item.value}},
{% endif %}
{% endfor %}
{% endfor %}
how do i return just the current metafield value of each product? (instead of listing all the values the field has ever had)
Solved! Go to the solution
This is an accepted solution.
That question doesn't make sense as it doesn't output prior values. It could be outputting another variable if you have another metafield with a key of "eta" (in a different namespace). Or it could be that your value is actually a list
This is an accepted solution.
That question doesn't make sense as it doesn't output prior values. It could be outputting another variable if you have another metafield with a key of "eta" (in a different namespace). Or it could be that your value is actually a list
Then how do you suggest it managed to end up with 4 results on an order with only 2 items, clearly listing 2 different results for each item? And the 'Arriving late December' bit an old value for the item?
ok - i found it - there is an old metafield with no definition with an eta key - it must have come from there i guess - how can i delete the old metafield? i dont see a delete button on it?
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025