What the title says. The use case is to tag the order with something like “FinalSale:SKU” so that our staff does not have to check each item individually on a given order to find out that an item on it is final sale.
For example if the order contains two products, SKU1 and SKU2 and SKU1 is tagged with “final sale”, I would like to add a tag to the order that says FinalSale:SKU1
I’m able to tag the order with a generalized tag such as “FinalSale” if ANY item on the order is final sale, that’s simple enough, but ideally I’d like to include the SKU in the tag itself.
I was able to figure this out. For anyone curious:
{% for lineItems_item in order.lineItems %} {% for tags_item in lineItems_item.product.tags %} {% if tags_item == "FinalSale" %}FinalSale:{{lineItems_item.sku}}{% endif %}{% endfor %},{% endfor %}