Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi
I am trying to update the meta field from one metafeild to another one
I have one metafeild with below value
Namespace and key product.stockanalysis
<ProductStockAvailability> <LIWCode>100342105</LIWCode> <SICode>-999</SICode> <LocalStock>0</LocalStock> <UnallocatedBackOrders>0</UnallocatedBackOrders> <APIDefaultBranchCode>1</APIDefaultBranchCode> <DepotStockRequested>true</DepotStockRequested> <AdditionalAvailability> <ProductStockAvailabilitySchedule> <AvailabilityType>SupplierOther</AvailabilityType> <IsExistingPO>false</IsExistingPO> <Quantity>1</Quantity> <DueDateNum>-999</DueDateNum> <HasDueDateNum>false</HasDueDateNum> </ProductStockAvailabilitySchedule> </AdditionalAvailability> <DepotAvailability /> <LocalStockAnalysis /></ProductStockAvailability>
Result metafeild name and key
product.localstock
product.suppilerstock
Now I want <LocalStock>0</LocalStock> and <Quantity>1</Quantity> to show on sperate metafeild is it possible
I am using this condition on flow but not working properly
{% metafields.product.stockanalysis %}
{% assign metafield_content = metafields.product.stockanalysis %}
{% if metafield_content contains '<LocalStock>' and metafield_content contains '</LocalStock>' %}
{% assign start = metafield_content | split: '<LocalStock>' | last %}
{% assign end = start | split: '</LocalStock>' | first %}
{{ end }}
{% else %}
"Metafield does not contain the desired text"
{% endif %}
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024