Hi everyone.
I’m trying to amend my customers’ order status page with an additional message.
I’ve followed the Shopify guide “Show content based on an order for a particular product” which works fine, but I only want a message to appear if a particular combination of products has been ordered.
So only if the customer’s order contains ‘product A’ AND ‘product B’, then display the message.
I know the code below is wrong (obviously) but does anyone know the correct code to make this work?
<script>
{% for line in checkout.line_items %}
// DEBUG looking at {{ line.title }}
{% if line.title contains 'Hat' %}
and
{% if line.title contains 'Gloves' %}
Shopify.Checkout.OrderStatus.addContentBox(
'<p>Great combination etc etc</p>'
)
{% endif %}
{% endfor %}
</script>