Set Minimum Order Price on Cart Page

Hi,

I am using the theme - https://www.cleancanvas.co.uk/shopify-themes/canopy

I have the below code to add in the cart liquid file:

{% assign min_order_amount = 40 %}
{% if cart.total_price < min_order_amount * 100 %}

Your current order total is below the minimum required amount of £40. Please add more items to your cart.

.btn--checkout { display: none; } {% endif %}

In the theme I can see only main-cart.liquid file. Is it where I need to add the above code?

Is there any location in that file where I need to add the code?

Thanks

Hi @paulson1

Yes, you can add the code to the main-cart.liquid file, as it’s the main file handling cart functionality in the Canopy theme. Place the code within the HTML section where you want the warning message and checkout button behavior to appear, ideally within the section displaying the cart summary or above the checkout button for visibility. This will ensure the minimum order amount message and hidden checkout button only appear when the cart total is below £40.

If you have other questions, I am willing to answer them more.

Best regards,

Daisy