The project is in a healthy, maintained state
Limit the minimum and maximum quantity per product or variant per order in Spree
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

Runtime

 Project Readme

Spree Limit order quantity

This is a Spree extension that allows store administrators to set minimum and maximum quantity limits per product or variant for each order. This helps control how many units of a product or variant a customer can add to their cart or order.

Features

  • Set minimum and maximum quantity per order for each product.
  • Override those limits at the variant level.
  • Enforce quantity limits in the cart and checkout process.
  • Edit these limits directly from the admin panel (Product or Variant edit pages).

Installation

  1. Add this extension to your Gemfile with this line:

    gem 'spree_limit_order_quantity', github: 'be-agile/spree_limit_order_quantity'
  2. Then bundle install:

    bundle install
  3. Run the install generator

    bundle exec rails g spree_limit_order_quantity:install
  4. Run migrations:

    rails db:migrate

Validation Behavior

During add-to-cart and checkout:

  • If the quantity is less than the minimum or greater than the maximum, the system will show an error and prevent the action.

  • Limits are applied per line item per order.

License

This extension is available as open source under the terms of either:

Credits

be agile Co., Ltd.