New to Shopify and Liquid (enjoying it). Not greatly experienced with JS! We have Shopify site that uses product tags for the chocolates in various chocolate boxes. The theme is not compatible with collection filtering and is setup to use tags for this also. Thus the tags now contain "Price £10 - £20" etc.
I have code on the product page that loops over all product tags and renders a snippet unless the tag contains 'price':
{% for tag in product.tags %}
{% unless tag contains 'Price' %}
<li>{% render 'chocolate-menu' with tag as tag %}</li>
{% endunless %}
{% endfor %}
All good and easy (with StackOverflow help). However, on the collection pages the 'quickview' option (which launches a popup) inserts a list of the chocolates (tags) via javascript:
var chocolatesMenu = product.tags;
var chocolatesMenuSpaced = chocolatesMenu.join(', ');
quickview.find(".proBoxInfo .quickViewSKU").append("<label>Chocolates:</label> " + chocolatesMenuSpaced);
How can I 'scrub' the price-related tags from product.tags in js? Or is there a clever liquid and js way to do this? I just want to list all tags that don't start with 'Price'.