I realise this is beyond the normal support terms, but if you can help that would be amazing! My JS skills are not the best.
Currently in cart.liquid I am hiding the Proceed to checkout button if there are less than 10 items in the cart with:
{% if cart.item_count < 10 %}
{% else %}
<input type="submit" name="checkout" class="proceed-checkout" value="{{ 'cart.general.checkout' | t }}"><a id="proceed-checkout" href="#" class="btn-medium-1">{{ 'cart.general.checkout' | t }}</a>
{% endif %}
This works fine, but allows the user to proceed to checkout if they add 10 items… then remove some items… but don’t update the cart (or refresh the page). Ideally I’d like to do this via JS onClick of the item quantities.
– OnClick of item qty – + buttons it checks api response of cart.js for item_count
– Until user has 10 items in cart a#proceed-checkout is hidden or disabled
If you could help that would be great! My googlefu is failing me.