Development of a quick order module for 1C-Bitrix

Our company is engaged in the development, support and maintenance of Bitrix and Bitrix24 solutions of any complexity. From simple one-page sites to complex online stores, CRM systems with 1C and telephony integration. The experience of developers is confirmed by certificates from the vendor.
Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1173
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    811
  • image_bitrix-bitrix-24-1c_development_of_an_online_appointment_booking_widget_for_a_medical_center_594_0.webp
    Development based on Bitrix, Bitrix24, 1C for the company Development of an Online Appointment Booking Widget for a Medical Center
    564
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    745
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    655
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    976

Development of One-Click Order Module for 1C-Bitrix

One-click order is a path to purchase in one step: user enters only name and phone, manager handles the rest. Conversion with this scheme is higher than with full checkout, especially on mobile devices. Bitrix doesn't have a ready-made one-click order component — it's built on top of the standard sale module.

Where the Module Is Located

The module registers in local/modules/vendor.quickorder/. Key files:

  • lib/QuickOrderHandler.php — business logic for order creation
  • lib/Notification.php — sending notifications
  • components/vendor/quickorder.form/ — form component
  • install/db/install.sql — log table creation

Order Creation via Sale API

One-click order in Bitrix is implemented via the sale module API. A product is added to the cart programmatically, then an order is created:

use Bitrix\Sale\Order;
use Bitrix\Sale\Basket;
use Bitrix\Sale\BasketItem;

$order = Order::create(SITE_ID, null); // null = guest order
$order->setPersonTypeId(1);

$basket = Basket::create(SITE_ID);
$item = $basket->createItem('catalog', $productId);
$item->setFields([
    'QUANTITY'         => 1,
    'CURRENCY'         => \Bitrix\Currency\CurrencyManager::getBaseCurrency(),
    'LID'              => SITE_ID,
    'PRODUCT_PROVIDER_CLASS' => \CCatalogProductProvider::class,
]);

$order->setBasket($basket);

$propertyCollection = $order->getPropertyCollection();
$propPhone = $propertyCollection->getPhone();
if ($propPhone) {
    $propPhone->setValue($phone);
}

$order->setField('USER_DESCRIPTION', $comment);
$order->save();

The status of a new order is set to "New" (usually N) or to a special "One-Click Order" status, which is created separately in the sale module status dictionary.

Quick Order Log Table

Besides creating an order in the system, we write a log to a separate table b_quickorder_log — this allows building statistics without parsing the entire b_sale_order table:

Field Type Purpose
ID int auto_increment
ORDER_ID int Created order ID in b_sale_order
PRODUCT_ID int Product ID
PHONE varchar(20) Phone number
NAME varchar(255) Name
SOURCE_URL varchar(2048) Page from which order was placed
UTM_SOURCE varchar(100) UTM parameters
CREATED_AT datetime
PROCESSED_AT datetime When manager took it

Server-Side Validation

The one-click form is minimal — name and phone. Phone validation on server via regex accounting for formats: +7 (999) 123-45-67, 89991234567, +375 29 123-45-67. After normalization, store in E.164 format.

Flood protection: check in b_quickorder_log how many orders from this IP in the last hour. On exceeding threshold (e.g., 5 orders), return error without creating order.

Notifications

After successful order creation, two notifications fire:

For manager — email event QUICKORDER_NEW with template including customer name, phone, product name and photo, link to order in admin. Additionally, SMS can be configured via integrated SMS provider API.

For customer — optional SMS confirmation: "Your order is accepted, manager will contact you within 15 minutes".

CRM Integration

If the project has a CRM module (custom or Bitrix24), when creating a one-click order, a lead is automatically created. Data is passed via \Bitrix\Crm\LeadTable::add() or via Bitrix24 REST API (crm.lead.add). The lead SOURCE_ID field is set to "One-Click Order from Site".

Button on Product Card

The "Buy in 1 Click" button is placed in the bitrix:catalog.element component template. On click, it opens a modal with form — either via bitrix:sale.order.ajax with custom template, or via custom AJAX component. The modal should not reload the page and must work correctly when product card component caching is enabled (form is loaded via separate non-cacheable AJAX request).

Development Timeline

Scale Content Duration
Basic Form, order creation in sale, manager email notification 3–4 days
Standard + Flood protection, DB log, UTM parameters, SMS notification 6–8 days
Extended + CRM integration, source analytics, A/B form testing 10–13 days