In a wholesale online store, each item is sold only in batches — of 6, 10, or 100 units. If a customer adds 5 instead of 6 to the cart, the cart either rounds the quantity up to the minimum or throws an error. At first glance, this is a simple setting via the admin panel. But in practice, when the catalog has 10,000 items and the batch depends on the supplier's packaging, manual editing becomes a nightmare. One of our clients with a catalog of 12,000 items spent a week setting values manually and still made errors in 15% of cases. We automated the process via CSV import and a synchronization script with 1C, reducing time to two hours.
In Bitrix, the minimum batch is set by the MIN_QUANTITY field in the b_catalog_product table. Additionally, STEP_QUANTITY is used — the quantity step (multiplicity). When a product is added to the cart, the catalog module reads MIN_QUANTITY and automatically raises the quantity if the customer entered less. Important: the field does not affect discounted prices and does not depend on stock — only the product itself.
Where it is stored and how MIN_QUANTITY works
Each product has a record in b_catalog_product with the following fields:
-
MIN_QUANTITY— minimum order quantity (decimal, default 1) -
STEP_QUANTITY— quantity increase step (multiplicity, default 1)
If MIN_QUANTITY = 0 or 1, the restriction does not apply. When adding to the cart, the system reads MIN_QUANTITY and, if the entered quantity is less, automatically raises it to the minimum (depends on the cart component setting).
Setup via the administrative interface
Catalog → [select product] → SKU/Quantity
Field "Minimum order quantity" — enter a number. Value 0 or 1 means no restriction. For mass assignment, use import via CSV or XML (Catalog → Import), where in the column MIN_QUANTITY you specify the desired value.
How to set the minimum batch for 10,000 products?
If there are many products, manually editing each one takes a week. The optimal way: import via CSV with file generation in Excel or on the 1C side. The column MIN_QUANTITY is present in the catalog export. For wholesale items, you can set a value of 6, for retail — 1. After importing, be sure to check consistency with STEP_QUANTITY (an error here is a common cause of cart malfunction). CSV import is 50 times faster than manual editing for 10,000 products.
Setup via API: step-by-step instructions
- Get the product or SKU ID (e.g., via
CIBlockElement::GetList). - Call
\Bitrix\Catalog\Model\Product::update($elementId, ['MIN_QUANTITY' => 10]). - Ensure the catalog cache is cleared (use the
ClearByTagmethod). - Verify in the cart that the new value is applied.
- For mass assignment, run a loop in an agent or script.
\Bitrix\Catalog\Model\Product::update($elementId, [ 'MIN_QUANTITY' => 10, ]); This method is preferable to CIBlockElement::SetPropertyValues because it works directly with the b_catalog_product table and triggers caching. We use it in custom agents for ERP synchronization.
Why doesn't MIN_QUANTITY work in headless frontend?
The standard component bitrix:sale.basket.basket reads MIN_QUANTITY and automatically adjusts the quantity. But if the frontend is headless (React, Vue), then MIN_QUANTITY must be fetched via REST API (catalog.product.get method) and client-side validation implemented. Otherwise, the customer may send 5, and the server will accept the order without validation — a cart error.
How to synchronize MIN_QUANTITY and STEP_QUANTITY?
If both a minimum batch and a step (STEP_QUANTITY) are set, the minimum quantity must be a multiple of the step. Example: MIN_QUANTITY = 6, STEP_QUANTITY = 3 — correct (6/3=2). But MIN_QUANTITY = 5, STEP_QUANTITY = 3 — leads to the cart raising the quantity to 6 (the next multiple), but the customer sees an unexpected change. We check this consistency automatically with a script.
More about checking residuals
For a quick check of all products, run the SQL query: ```sql SELECT ID, MIN_QUANTITY, STEP_QUANTITY FROM b_catalog_product WHERE MIN_QUANTITY > 0 AND STEP_QUANTITY > 0 AND MIN_QUANTITY % STEP_QUANTITY != 0; ``` This will identify inconsistent records. Such products need to be fixed or the step forcibly aligned.Setup methods: comparison
| Method | Time per 1 product | Suitable for mass | Errors |
|---|---|---|---|
| Admin (manual field) | 1–2 min | up to 50 products | possible typos |
| CSV import | 1–2 hours per catalog | from 100 products | data preparation required |
| API (script) | 10–15 min for development | from 1000 products | minimal if tested |
Typical errors and their solutions
| Error | Cause | Solution |
|---|---|---|
| Cart does not raise quantity | Component does not read MIN_QUANTITY |
Update cart template or implement validation |
| Quantity changes unpredictably | MIN_QUANTITY not a multiple of STEP_QUANTITY |
Align multiplicity |
| Values reset after import | Incorrect CSV format (column missing) | Check field mapping |
| Headless frontend does not apply minimum | Client-side validation missing | Add check based on REST API |
Delivery time
Basic setup of the minimum batch for one product or a group via import — from 2 to 4 hours. Includes: analysis of current data, file preparation, import, cart verification, fixing consistency errors. If a script for automatic synchronization with 1C is required, the time increases to 1 day.
What is included in a turnkey setup
- Audit of existing
MIN_QUANTITYandSTEP_QUANTITYvalues across the entire catalog - Preparation and execution of mass import (CSV/XML)
- Writing an API script (if automation is needed)
- Checking cart operation in standard and custom components
- Brief support documentation
- Consultation on headless frontend (if relevant)
We are certified Bitrix specialists with implementation experience in over 50 catalog configuration projects for wholesale and retail trade. We guarantee stable cart operation after changes. Reduced catalog maintenance costs and up to 80% time savings are expected results.
Official 1C-Bitrix documentation — MIN_QUANTITY will help you understand the nuances.
For mass setup or complex scenarios (integration with 1C, custom step, stock check) — contact us. We will evaluate your project within 1 working day and offer the optimal solution. Get in touch for a catalog audit. Apply for a detailed analysis — receive a consultation.

