Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025