Liquid, JavaScript, themes, sales channels
We're needing to remove the checkout button when the order value is less than $30. We added this code into the cart.liquid which is showing the "Minimum order is $30" at the checkout button but it isn't hiding the button itself.
How can I change this to hide the button as well?
Thanks for any help!
{% if cart.total_price < 3000 %}
<font color="#990000">
Minimum order is $30
</font>
{% endif %}
</div>
<a href="collections/all" class="btn btn--secondary cart__update cart__continue--large small--hide" >{{ 'cart.general.continue_shopping' | t }}</a>
<input type="submit" name="update" class="btn btn--secondary cart__update cart__update--large small--hide" value="{{ 'cart.general.update' | t }}">
{% if cart.total_price > 2999 %}
<input type="submit" name="checkout" class="btn btn--small-wide" value="{{ 'cart.general.checkout' | t }}">
{% endif %}
At a first look the code seems correct.
Can you share the Shop URL and/or the name of the theme you are using?
Are you sure that you that you don't have an old version of Supply?
I just tried with this code and it is working, check it.
{% if cart.total_price >= 3000 %}
<button type="submit" name="checkout" class="btn">
<span class="icon icon-cart"></span>
{{ 'cart.general.checkout' | t }}
</button>
{% endif %}
{% if additional_checkout_buttons %}
<div class="additional-checkout-buttons">{{ content_for_additional_checkout_buttons }}</div>
{% endif %}
{% if cart.total_price < 3000 %}
<div class="minimum-order-notice">
<span style="color:#990000">Minimum order is $30</span>
</div>
{% endif %}
It's possible it is an old version. How would I check and update it?"I tried your code with the same result. The text showing order minimum is there but so is the checkout button.
Mmm I just checked and your versions it's quite a bit outdated.
You are using Supply version 3.3.1
I just download Supply couple of days ago and the version is 9.0.3
We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023Photo by Marco Verch Sales channels on Shopify are various platforms where you can sell...
By Ollie May 25, 2023