Development of a social commerce system using 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
    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

Development of Social Commerce System in 1C-Bitrix

Social commerce — sales through mechanisms of social interaction: reviews with ratings, wishlists, group purchases, referral programs, likes and product sharing. Each mechanism either lowers purchase barrier (social proof) or expands reach (virality). Bitrix has part of them in basic package, part requires development.

Reviews and ratings module

Bitrix has built-in reviews via reviews component and ratings via vote. For full social commerce need to extend:

Verified purchases — review can be left only by user who bought product. Check: b_sale_order_basket contains PRODUCT_ID in completed orders of USER_ID. Add condition to PHP handler before review creation via CIBlockElement::AddSection() or custom bl_product_reviews table.

Photos in reviews — standard reviews component doesn't support media. Create own component with AJAX file upload via \CFile::SaveFile() and review link via custom bl_review_media table.

Sorting by helpfulness — "Helpful/Not helpful" buttons with voting via \Bitrix\Vote\VoteTable. Result used for ranking reviews by default.

Wishlists and wish lists

Wishlist — user's named list of products. Build system on custom table:

// Structure of bl_wishlists table
// wishlist_id, user_id, name, is_public, share_token, created_at

// Structure bl_wishlist_items
// id, wishlist_id, product_id, added_at, note

class WishlistService
{
    public static function addItem(int $userId, int $productId, ?string $wishlistName = null): void
    {
        $wishlistId = self::getOrCreateDefault($userId, $wishlistName);

        // Check if product already exists
        $exists = WishlistItemTable::getRow([
            'filter' => ['WISHLIST_ID' => $wishlistId, 'PRODUCT_ID' => $productId],
        ]);

        if (!$exists) {
            WishlistItemTable::add([
                'WISHLIST_ID' => $wishlistId,
                'PRODUCT_ID'  => $productId,
                'ADDED_AT'    => new \Bitrix\Main\Type\DateTime(),
            ]);
        }
    }

    public static function shareWishlist(int $wishlistId): string
    {
        $token = bin2hex(random_bytes(16));
        WishlistTable::update($wishlistId, ['SHARE_TOKEN' => $token, 'IS_PUBLIC' => 1]);
        return '/wishlist/shared/' . $token;
    }
}

Public wishlist page accessible via URL with token — other user can add products directly to cart. Works as viral mechanism, especially in gift categories.

Group purchases

Group purchase — user creates "group order", invites others, at target quantity price drops. Implementation:

bl_group_purchases table: id, product_id, creator_user_id, target_qty, current_qty, discount_pct, price_with_discount, expires_at, status.

bl_group_purchase_members table: group_id, user_id, joined_at, paid.

When current_qty >= target_qty agent changes status = active and sends notifications. Each participant pays their share at reduced price — separate order in b_sale_order created with discount.

Referral program

Referral mechanism: user gets unique link, distributes in social networks. Visiting link, new visitor sees special offer or discount. On purchase — referrer gets bonus.

// Generate referral link
$refCode = base64_encode($userId . '-' . crc32($userId . SITE_SECRET));
$refLink = 'https://' . SITE_SERVER_NAME . '/?ref=' . $refCode;

// Handler for incoming traffic (in init.php or component)
$refCode = $_GET['ref'] ?? null;
if ($refCode && !isset($_SESSION['ref_code'])) {
    $_SESSION['ref_code'] = $refCode;
    setcookie('ref_code', $refCode, time() + 86400 * 30, '/');
}

// On order creation — credit bonus to referrer
AddEventHandler('sale', 'OnSaleOrderSaved', function(\Bitrix\Sale\Order $order) {
    $refCode = $_COOKIE['ref_code'] ?? null;
    if ($refCode) {
        $referrerId = ReferralService::getUserIdByCode($refCode);
        if ($referrerId && $referrerId !== $order->getUserId()) {
            BonusService::credit($referrerId, $order->getPrice() * 0.05); // 5% of purchase
        }
    }
});

Product sharing in social networks

"Share" buttons in product card — standard share links. To track shares add AJAX endpoint that records event in bl_share_events(product_id, user_id, network, created_at) and returns UTM link with user ID for attributing sales via social traffic.

Open Graph and meta tags for social networks

When sharing, social network parses Open Graph tags of product page. In catalog.element template add:

<meta property="og:title"       content="<?= htmlspecialchars($arResult['NAME']) ?>"/>
<meta property="og:description" content="<?= htmlspecialchars($arResult['PREVIEW_TEXT']) ?>"/>
<meta property="og:image"       content="https://<?= SITE_SERVER_NAME ?>/<?= \CFile::GetPath($arResult['PREVIEW_PICTURE']) ?>"/>
<meta property="og:price:amount"   content="<?= $arResult['CATALOG_PRICE_1']['PRICE'] ?>"/>
<meta property="og:price:currency" content="RUB"/>

Implementation timeline

Component Complexity Timeline
Verified reviews with photos Medium 5–7 days
Wishlists with public access Medium 4–6 days
Referral program Medium 5–8 days
Group purchases High 10–15 days
Open Graph and sharing with attribution Low 2–3 days

What we develop

  • System of verified reviews with purchase history check and media support
  • Wishlists with public links for social network sharing
  • Referral program with tracking via cookie/UTM and bonus accrual
  • Group purchase mechanism with quantity thresholds and time limits
  • Open Graph meta tags for correct product display when sharing