Minimum order value - Trade Theme 15.3.0

Topic summary

A user seeks to enforce a £40 minimum order value at the cart level in Shopify’s Trade Theme 15.3.0 without using apps.

Proposed Solution:

  • Edit the theme’s cart-template.liquid or cart.liquid file
  • Insert Liquid code before the checkout button that:
    • Compares cart.total_price (in pence) against the £40 threshold (4000 pence)
    • Displays a warning message and hides the checkout button when the minimum isn’t met
    • Shows the checkout button normally once the threshold is reached

Key Technical Details:

  • Cart totals are stored in cents/pence, requiring multiplication by 100 for comparison
  • AJAX or drawer carts may need additional JavaScript checks
  • This approach works for non-Plus stores (Plus stores can use Scripts or Checkout Extensions for backend enforcement)

Status: One responder provided detailed implementation code with styling notes; another offered personalized assistance pending store access. The discussion remains open for implementation feedback.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

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.

1 Like

Hi @Adam_APC

Yes, you can implement a minimum order value of £40 at the cart level without using apps by editing your theme’s cart template. The common approach is to add Liquid code in your cart-template.liquid (or cart.liquid) file that checks the cart total and prevents checkout if the minimum is not met.

Here’s a simple and effective example based on community solutions:

Step-by-Step Guide to Add Minimum Order Value (£40) in Shopify Theme Code#### 1. Access Your Theme CodeFrom Shopify admin, go to Online Store > Themes > Actions > Edit code.

Open the file that renders your cart page, usually named cart-template.liquid or cart**.liquid** under the sections or templates folder.

2. Add the Minimum Order Value CheckLocate the code that outputs the Checkout button. Just before this button, insert the following

Liquid code snippet:

{% assign min_order_amount = 40 %}

{% if cart.total_price < min_order_amount | times: 100 %}
  

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

  
{% endif %}

Explanation:- 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.

3. Save and Test- 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.

Additional Tips- 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.