Solved

How can I add product types to order tags without errors?

Dan_Laguardia1
Shopify Partner
11 0 1

In an effort to streamline fulfillment, we want to add the Product Types in the order, in the Order Tags.

 

We are using the default syntax, but get a "Order tags is invalid" error.

 

Product Tags_Flow.png

Accepted Solution (1)

paul_n
Shopify Staff
1012 133 242

This is an accepted solution.

You are using shop productTypes, which a list of all types in your shop. Highly recommend you remove that as it will not work.

 

I think you want to put the product type of each item in the Order. That would be located at:

Order / lineItems / product / productType

 

Additionally, to add each as a separate tag, you need to separate them by a comma in the liquid. And finally, if your product types have commas you need to remove them because commas are used by the tag action to create separate tags. Assuming you want to substitute a hyphen, this would look like:

{% for lineItems_item in order.lineItems %}{{ lineItems_item.product.productType | replace: ",", "-" }},{% endfor %}

 

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
1012 133 242

This is an accepted solution.

You are using shop productTypes, which a list of all types in your shop. Highly recommend you remove that as it will not work.

 

I think you want to put the product type of each item in the Order. That would be located at:

Order / lineItems / product / productType

 

Additionally, to add each as a separate tag, you need to separate them by a comma in the liquid. And finally, if your product types have commas you need to remove them because commas are used by the tag action to create separate tags. Assuming you want to substitute a hyphen, this would look like:

{% for lineItems_item in order.lineItems %}{{ lineItems_item.product.productType | replace: ",", "-" }},{% endfor %}

 

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.