To set a minimum order amount in your Shopify store, you can indeed modify the cart-template.liquid file. Here’s a sample code snippet that checks the cart’s total value and prevents the user from checking out if it’s below £40.
Follow these steps:
Online Store > Theme > Edit Code
Open cart-template.liquid (this file may also be named cart.liquid depending on your theme).
Add The following code before the checkout button:
{% 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.
{% endif %}
If I was able to help you, please don’t forget to Like and mark it as the Solution!
where min is the minimum and max is the maximum. I use the product/variant meta field as a reference for the value. Look for the tag quantity-selector. If you still need help, let me know. I also need to know what theme you use.
Thank you for your response! I’m glad to hear the solution worked well for you. If you need any further assistance, please don’t hesitate to reach out.