=== Liftly Min/Max Quantities & Order Rules for WooCommerce ===
Contributors: taylerz
Tags: min max quantity, minimum order amount, quantity limit, quantity step, minimum order
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Set min and max quantities, pack sizes and a minimum order. A friendly cart bar shows shoppers exactly what is left to add.

== Description ==

**Stop small, awkward orders without turning shoppers away.**

Liftly Min/Max Quantities gives your store the rules WooCommerce leaves out: minimum and maximum quantities, products sold in packs, a minimum order amount and item limits. Shoppers learn each rule in plain, friendly words before they reach checkout, so orders come in right the first time.

Say your paper filters are sold in packs of 6. A shopper adds 4 and gets 6, with a note that says why. Another shopper's cart is at $26.00 and your minimum is $30: the cart shows "Add $4.00 more to check out" with a progress bar and a "Continue shopping" link, and the checkout button waits until the minimum is met.

= Why store owners choose it =

* **Set up in a minute.** One Rules page for the whole store and a Quantity rules tab on every product. Set a minimum, a maximum, a pack size, or any mix of them, and see what shoppers will read as you type.
* **Shoppers see the rule before they add.** A short hint sits under the quantity field, such as "Sold in packs of 6" or "Minimum 2 · maximum 5". The quantity field starts at the minimum and moves in pack steps on product pages, in the cart and in the Cart block.
* **Quantities fixed kindly, not refused.** Adding 4 of a pack of 6 adds 6 and says so. Adding past the maximum adds up to the maximum and says that too. No error walls, no dead ends, no lost carts.
* **A minimum order that sells, not scolds.** A warm progress bar shows exactly what is left to reach your minimum, with a way back to the shop. It shows in the cart and, if you like, in the mini cart and on product pages.
* **No order slips through.** Every rule is checked on your server: at add to cart, in the cart, in the classic and the block checkout, and in direct Store API requests.
* **Rules for the whole cart.** Minimum and maximum order amount, measured after coupons and with or without tax, plus minimum and maximum number of items. Leave gift cards or samples out of the count.
* **Your words, live preview.** Every message and the bar text use simple placeholders like {amount}, {min}, {max} and {product}. Pick the bar color and watch the cart bar and the product hint update as you type.
* **See what it earns.** Results show the orders that reached your minimum after shoppers saw the bar, how much they added, and the checkouts your rules held back each day.

= How it works =

1. Install and activate WooCommerce and Liftly Min/Max Quantities.
2. Open WooCommerce → Min/Max Quantities, set your minimum order and write your messages. For one product, edit it and open Product data → Quantity rules.
3. Shoppers see what is left in the cart, get friendly quantity corrections, and your orders come in the size you need.

= Works with =

Classic and block themes (Storefront, Twenty Twenty-Five and others), simple and variable products, the classic cart and checkout, the Cart and Checkout blocks, and High-Performance Order Storage (HPOS). Clear on phones, read out by screen readers and calm for people who prefer less motion. All texts are translatable, and the messages shoppers see can be changed in the settings.

= Privacy and speed =

Everything runs inside your WordPress site: no account, no external service, no tracking. A small stylesheet and script load only on the cart, checkout and product pages.

= More from Liftly =

* **Liftly Free Shipping Bar & Cart Goals:** show shoppers how close they are to free shipping.
* **Liftly Tiered Pricing & Quantity Discounts:** reward bigger quantities with a clear price table.
* **Liftly Order Bump & Checkout Upsells:** offer one more product with a single tick at checkout.

== Installation ==

1. Install and activate WooCommerce.
2. Install Liftly Min/Max Quantities from Plugins → Add New, or upload the plugin folder to `/wp-content/plugins/`.
3. Activate it and open WooCommerce → Min/Max Quantities to set your order rules and messages.
4. To give a product its own rules, edit the product and open Product data → Quantity rules.

== Frequently Asked Questions ==

= Does it work with the Cart and Checkout blocks? =

Yes. The bar sits right above the Cart block's checkout button and updates as the cart changes, the quantity stepper follows the pack size, minimum and maximum, and the block checkout shows a clear message if a rule is not met. The classic cart and checkout work too.

= Where do I set the rules for one product? =

Edit the product and open Product data → Quantity rules. Set a minimum, a maximum, a pack size, or any mix of them. The panel shows the hint shoppers will see.

= Can I set a minimum order amount for the whole store? =

Yes. Open WooCommerce → Min/Max Quantities and enter your minimum order amount. You can also set a maximum amount, and a minimum and maximum number of items in the cart.

= How are the order amounts counted? =

From the cart subtotal after coupons, with or without tax as you choose. Shipping is not included. If a coupon takes the cart below the minimum, the bar shows what is left to add.

= Does it work with variable products? =

Yes. Rules set on a variable product apply to each variation in the cart. With packs of 6, a shopper buys 6, 12 or 18 of each size or colour.

= What happens when a shopper picks the wrong quantity? =

The store helps instead of refusing. Adding 4 of a product sold in packs of 6 adds 6, and adding more than the maximum adds up to the maximum. A short message explains what happened, with the numbers.

= Can shoppers get around the rules? =

No. The rules are checked on your server at every step: when products are added, when the cart changes and when the order is placed in the classic or the block checkout, including direct Store API requests.

= Can I leave gift cards or samples out of the item count? =

Yes. Choose products or whole categories to leave out of the item count on the Rules page.

= Can I change the messages? =

Yes. Every message, the bar text, the link text and the product hint can be changed on the Rules tab, with a live preview. You can also turn the bar, the link or the hint off, and choose the bar color.

= Can I use it with a free shipping bar? =

Yes. The minimum order bar has its own color and wording and appears with the cart totals, so a free shipping bar above the cart stays easy to read.

= Will it slow down my store? =

No. Its small stylesheet and script load only on the cart, checkout and product pages, and it makes no requests to outside services.

= What happens to my rules if I delete the plugin? =

Your rules and settings stay until you choose "Remove data when deleted" in the plugin's settings. Past orders always keep their history.

= Do I need an account? =

No. There is no account, no sign-up and no external service.

== Screenshots ==

1. Every cart shows what is left to reach your minimum order, with a link back to the shop.
2. A friendly note when a quantity is rounded up to a full pack.
3. Packs, minimums and limits shown up front: a short hint under the quantity field, and the same clear bar on phones.
4. Checkout keeps your rules too, with a clear message instead of a dead end.
5. Your order rules and messages, with a live preview of the cart bar and the product hint.
6. A Quantity rules tab on every product, checked as you type.
7. Results: orders raised to the minimum, what shoppers added and checkouts held back.
8. Clear on every phone: the same kind quantity fix right on the product page.

== Changelog ==

= 1.0.0 =
* First release.
