Message in cart drawer when below minimum order quantity

Hi all,

I am building a wholesale website on a budget in the Debutify theme. I am using the cart drawer so customers can easily add to their order and change quantity. This all works fine.

I also want to add a notice and hide the checkout button if the total is below 100 or above 1200. I got it to work on the normal cart but on the drawer it does not update unless I reload the page, which makes sense because there is no function updating this.

I am not at all experienced with ajax but I do understand programming logic. What do I have to do to make this update just like the quantity selector does?

PS: here is the changes I made to ajax-cart-template.liquid

{% if customer %}
          {% if cart.total_price < 10000 %}
                {% raw %}
                    

Please order a minimum quantity of 10 trays 
(e.g. two packs of 5 or one pack of 10)

                {% endraw %}
              {% elsif cart.total_price > 120000 %}
                {% raw %}
                    

Maximum order quantity of $1200 exceeded. Please contact us for a larger order so we can schedule it realiably.

                {% endraw %}            
              {% else %}
                  {% raw %}
                      

Thanks

PS: I am not looking to buy an add-on or another subscription. My budget won't allow it. I am sure with community help I can figure it out :wink: