We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Update Order Metafield \n error. For value: "330\n"

Solved

Update Order Metafield \n error. For value: "330\n"

candle_nurse
Visitor
2 0 0

I have used the hyphens in each to get rid of the majority of them. For some reason there is one at the end that still does not go away. Exception: Got error updating metafield: "Value must be an integer." For value: "330\n", Type: number_integer. 

{%- assign total_volume = 0 -%}
{%- for lineItems_item in order.lineItems -%}
{%- assign product_volume = lineItems_item.variant.variantVolume.value -%}
{%- assign item_volume = product_volume | times: lineItems_item.currentQuantity -%}
{%- assign total_volume = total_volume | plus: item_volume -%}
{%- endfor -%}
{{total_volume}}

 

Accepted Solution (1)

paul_n
Shopify Staff
1828 199 435

This is an accepted solution.

{{- total_volume -}}

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.

View solution in original post

Reply 1 (1)

paul_n
Shopify Staff
1828 199 435

This is an accepted solution.

{{- total_volume -}}

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.