Shopify themes, liquid, logos, and UX
I would like to implement a minimum order value (at cart level) without using apps. The minimum order value is £40. Can this be achieved by editing the theme code - if so, what and how do I need to add?
To summarise, the total cart value must be greater than £40.00 before an order can be placed.
Hi @Adam_APC
{% assign min_order_amount = 40 %}
{% if cart.total_price < min_order_amount | times: 100 %}
<p style="color: red; font-weight: bold; margin-bottom: 10px;">
Your current order total is below the minimum required amount of £{{ min_order_amount }}. Please add more items to your cart.
</p>
<style>
/* Hide the checkout button when minimum order not met */
.btn--checkout,
input[name="checkout"] {
display: none !important;
}
</style>
{% endif %}
cart.total_price is in cents/pence, so we multiply the minimum amount by 100 for comparison.
If the cart total is less than £40, a red warning message appears and the checkout button is hidden, preventing users from proceeding.
When the cart total meets or exceeds £40, the checkout button appears normally.
Save your changes.
Add products to your cart and try to checkout with less than £40 total-you should see the warning and no checkout button.
When the cart total is £40 or more, the checkout button should appear and function normally.
You can style the warning message and button hiding to fit your theme’s design.
For themes using AJAX cart or drawer carts, you may need to add similar checks in those templates or use JavaScript to enforce the rule dynamically.
This method works well for stores not on Shopify Plus, as checkout.liquid customization is restricted.
For a more robust solution (including blocking checkout on the backend), Shopify Plus merchants can use Shopify Scripts or Checkout Extensions.
Hello @Adam_APC
Welcome to the Shopify Community! Please share your store URL and password (if it’s password-protected), so I can check and provide you with the exact solution.
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025