Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
I am trying to use this code as the new location information in the Move Fulfillment location action in a workflow
{% assign customAttributeName = 'Pickup_Store' %}
{% assign targetLocationId = '' %}
{% for getFulfillmentOrderDataForeachitem in getFulfillmentOrderData %}
{% if targetLocationId == '' %}
{% for customAttributes_item in getFulfillmentOrderDataForeachitem.order.customAttributes %}
{% if customAttributes_item.key contains customAttributeName %}
{% assign targetValue = customAttributes_item.value %}
{% for locationsForMove_item in getFulfillmentOrderDataForeachitem.locationsForMove %}
{% if targetValue contains locationsForMove_item.location.name %}
{% assign targetLocationId = locationsForMove_item.location.id %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
{% endfor %}
{{ targetLocationId }}
I have ran the code via a send email and the code return on Location SID per each loop. But when I put it into the new location is errors and says that it is not a valid location. The result in the email looks like this gid://shopify/Location/########### (masking the actual location number).
Anyone have any suggestions or tricks to make this work.
Basically I am trying to take custom attribute string look up the appropriate location from that and move the fulfillment order accordingly.
We are a pick up at select locations only business no mail deliver so the default rules aren't much help here.
Thank you.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024