Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I'm seeing this 'has_preorders' attribute appearing in orders that do not contain any item tagged with 'pre-order'.
This code snippet is in 'cart.liquid' and is the only code that refers to the 'has_preorders' attribute.
{% assign has_preorder = false %}
{% for item in cart.items %}
{% if item.product.tags contains 'pre-order' %}
{% assign has_preorder = true %}
{% endif %}
{% endfor %}
{% if has_preorder %}
<div class="five columns offset-by-one">
<input type="hidden" name="attributes[has_preorder]" value="true" />
<p>This order has a pre-sale item and will ship within 7 days</p>
</div>
{% endif %}
Can anyone see what I'm doing wrong here?
Did you figure this out? I have a similar problem and yours looked okay to my newb eyes.