Configuring Minimum Order Amount for B2B in 1C-Bitrix
A minimum order amount in B2B is not just a restriction — it's an economic necessity: processing a 500-unit order with 300-unit logistics cost is unprofitable. The task is to implement the check so that different clients have different minimums and the restriction applies before, not after checkout.
Standard Way via Shop Settings
Bitrix has a basic minimum order amount restriction: Shop → Settings → General Settings → "Minimum order amount" field. This is a single value for all users. When trying to place an order below the threshold, an error message is displayed, and the "Checkout" button is unavailable.
For B2B with a uniform minimum, this is sufficient. But in practice, wholesale companies have different minimums for different groups: new customer — 10K, regular wholesaler — 5K, VIP dealer — no restrictions.
Group Minimums via Event Handler
Implemented via the OnBeforeSaleOrderAdd handler. Logic:
- Determine the user's group or their dealer company
- Get the minimum amount for this group from settings (module options or Highload block)
- Compare with the order amount
$order->getPrice() - If the amount is below — add an error via
$event->addError(), the order is not created
Storage of minimums by groups: module options table or Highload block b2b_order_limits with fields UF_GROUP_ID / UF_COMPANY_ID, UF_MIN_ORDER_AMOUNT, UF_CURRENCY.
Warning in Cart
Blocking at order creation stage is too late. The user should see a warning in the cart while adding items. This is done in the cart component: in result_modifier.php, calculate the current cart amount and the minimum for the user, add the IS_BELOW_MINIMUM flag to $arResult and the amount needed to reach the threshold. The template shows an informer: "You need 3,200 more currency units to reach the minimum order amount."
Minimum by Categories
Sometimes the minimum is set not for the entire order, but for specific product categories (e.g., "Fragile goods" category ships with a minimum of 15K). Implemented via the same OnBeforeSaleOrderAdd event: group cart items by IBLOCK_SECTION_ID, check the minimum for each category from the Highload block of rules.
Timelines
Basic minimum setup via interface: 1 day. Developing group minimums with cart warning: 3-5 days.







