Developing a Quick Order ("Buy in One Click") for 1C-Bitrix
"Buy in one click" is a form with a minimal set of fields (usually just a phone number) that creates an order in Bitrix without going through the standard checkout. Bitrix has no ready-made component for this — it is always custom development. When implemented incorrectly, "one-click" orders end up with the status "New" but without a linked cart, without delivery calculation, and without the option for online payment — leaving managers to clarify everything manually.
What Happens When "Buy in One Click" Is Pressed
A technically correct implementation must:
- Create an order in Bitrix via
\Bitrix\Sale\Order::create()specifying the product, quantity, and price - Link the order to an anonymous or authenticated user
- Set the order status, payer type, and properties (phone number from the form)
- Notify the manager via the
OnSaleOrderSavedevent or\Bitrix\Sale\Notify - Send the buyer a confirmation to their phone (SMS via the
smscmodule or another provider)
Minimal order creation handler:
$order = \Bitrix\Sale\Order::create('s1', \CSaleUser::GetAnonymousUserID());
$order->setPersonTypeId(1); // payer type "individual"
$basket = \Bitrix\Sale\Basket::create('s1');
$item = $basket->createItem('catalog', $productId);
$item->setFields([
'QUANTITY' => $quantity,
'CURRENCY' => 'RUB',
'LID' => 's1',
'PRODUCT_PROVIDER_CLASS' => '\Bitrix\Catalog\Product\CatalogProvider',
]);
$order->setBasket($basket);
$propertyCollection = $order->getPropertyCollection();
$phoneProp = $propertyCollection->getItemByOrderPropertyCode('PHONE');
if ($phoneProp) {
$phoneProp->setValue($phone);
}
$order->setField('STATUS_ID', 'N'); // status "New"
$result = $order->save();
Button Behaviour Variants
Modal window with a form. The most common variant: the "Buy in one click" button opens a modal window with a phone field (and optionally a name field). On submission, an order is created and the message "We will call you back" is shown.
Form inline on the product page. For certain niches (complex products where a manager's explanation is important), the form expands directly below the button without a modal window. Conversion is slightly lower due to the user leaving the product browsing context, but the rate of modal dismissal decreases.
Quick order from the catalog listing (on the card). A "Buy in one click" button on the catalog listing — without navigating to the product page. Here it is important to pass not just the product ID, but also the selected trade offer (colour, size) if any exist. This requires a prior offer selection step or automatic selection of the first available option.
Non-Standard Scenarios
Quick order for multiple items. In B2B, multiple line items need to be ordered without a full checkout. Implementation: a form with a table of items from the current cart, a phone number field — and a "Submit request" button. Essentially a quick order of the entire cart.
CRM integration. When a "one-click" order is created, a lead is simultaneously created in Bitrix24 CRM via REST API. This allows managers to work in the CRM rather than in the store admin panel. The integration uses the OnSaleOrderSaved event handler, which calls crm.lead.add via \Bitrix\Crm\Integration\Sale\OrderAware.
Phone verification via SMS. When the rate of fake "one-click" orders is high — OTP (one-time password) verification is added. The user enters a phone number, receives an SMS with a code, enters the code — only then is the order created.
Case Study: Quick Order with Pre-fill for Authenticated Users
Client — a sports nutrition store with a high rate of repeat purchases. Task: for authenticated buyers, "one click" must be literally one click — no phone number entry, with automatic selection of the last used delivery method.
Solution: a "Buy again" button next to each product in the order history. When clicked — the user's last order is retrieved via \Bitrix\Sale\Order::getList(['filter' => ['USER_ID' => $userId], 'order' => ['DATE_INSERT' => 'DESC'], 'limit' => 1]), the delivery method and address are taken from it, and a new order is created with the same parameters. The user only sees a confirmation notification: "Order #XXXX created, please wait for a call."
Conversion for authenticated users increased — a repeat order took 2 seconds instead of 3 minutes.
Development Timeline
| Variant | Timeline |
|---|---|
| Modal window + order creation + manager notification | 1–2 days |
| + SMS confirmation to buyer | +0.5 day |
| + CRM integration (lead) | +1 day |
| + Phone verification via OTP | +1–2 days |
| Quick order of entire cart + CRM | 3–5 days |







