Removing commas from data.tags

I am displaying product tags as a class to filter what products customers see based on what type of customer they are.


As the website is using Boost Commerce filter system (example file can be found here) I have to use data.tags to pull the tags through and display them. The issue with this is that it displays all the tags without spaces and commas in between, so like this DJI,drone,commercial.

Is there away to remove the commas and replace them with spaces?

Shopify Partner
735 83 122

@JoshSpires ,

You may try the replace filter in array while assigning

{{ product.tags | replace: ','  , ' ' }}
- Was my reply helpful? Click Like or Click Accept as Solution
To hire: email us at
checkout our app
162 9 16

Hello @JoshSpires 

Does this app have the function to transform the comma into space? You can try the Collection Filter & Search Bar app in an unpublished duplicated theme. It allows you to transform the product attributes for the search and filter without changing the Shopify data. You can also copy the product tags to metafields in list form and filter by metafields.

It also has the Merchandising rule to show the products for specific customer groups (based on product tags, metafield, options, collection, type).