Liquid, JavaScript, themes, sales channels
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?
You may try the replace filter in array while assigning
{{ product.tags | replace: ',' , ' ' }}
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).
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024