Setting up QR codes for quick access to 1C-Bitrix products

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
    1175
  • 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
    747
  • 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

Setting up QR codes for quick product access in 1C-Bitrix

Warehouse worker scans QR code on box and lands on product card in catalog. Marketer prints QR on price tag in offline store — customer scans and sees reviews, specs, "Buy" button. Task is technically simple but implementation details determine whether system works stably with thousands of products.

Forming URL for QR

QR code is encoded URL. Question is which URL to encode.

Direct product link (https://shop.by/catalog/product/artikul-123/) — works until SEO-friendly address changes. Renamed catalog section — all printed QR codes became broken.

Redirect link by ID (https://shop.by/qr/1234/) — more reliable. Create PHP page or handler in urlrewrite.php that gets current URL by product ID via CIBlockElement::GetByID() and makes 301-redirect. QR code doesn't depend on catalog structure.

Link by XML_ID or article (https://shop.by/qr/?sku=ART-0042) — best option for 1С integration where article is main identifier. Handler searches element by ARTICLE property and redirects.

QR code generation

QR is generated on server by PHP library. Two working options:

  • chillerlan/php-qrcode — compact, no dependencies, generates SVG and PNG.
  • endroid/qr-code — more features (logo inside QR, colors) but heavier.

Install via Composer: composer require chillerlan/php-qrcode. Generate in catalog.element component: in result_modifier.php add code creating QR SVG string for current product. SVG embed in template via $arResult['QR_CODE_SVG'].

For mass generation (catalog print, labels) create separate page /admin/qr-export/ generating PDF with QR codes for selected products. TCPDF or Dompdf library handles the task.

Caching and performance

Generating one QR takes 5–15 ms. On catalog page with 30 products — up to 450 ms just on QR. Solution: generate QR once and save as file to /upload/qr/{ELEMENT_ID}.svg. When product URL changes (event OnAfterIBlockElementUpdate) — delete file so new one generates on next request.

UTM tags and analytics

Add UTM parameters to URL inside QR: ?utm_source=qr&utm_medium=offline&utm_campaign=price_tag. This allows tracking in Yandex.Metrica and Google Analytics how many clicks offline media give. Parameters don't affect redirect — handler just passes them through.