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 %}
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