Vue.js Delivery Calculator for 1C-Bitrix — Development and Integration

Vue.js Delivery Calculator for Bitrix: From Idea to Implementation A user adds a product to cart, fills in data, then sees a 4000 ruble delivery cost — and closes the tab. 20% of carts are abandoned at this stage. According to <cite>Wikipedia</cite>, one in five users abandons cart due to unexpec

Our competencies:

Frequently Asked Questions

Latest works

  • image_website-b2b-advance_0.webp
    B2B ADVANCE company website development
    1415
  • image_bitrix-bitrix-24-1c_fixper_448_0.webp
    Website development for FIXPER company
    995
  • 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
    733
  • image_bitrix-bitrix-24-1c_mirsanbel_458_0.webp
    Development based on 1C Enterprise for MIRSANBEL
    862
  • image_crm_dolbimby_434_0.webp
    Website development on CRM Bitrix24 for DOLBIMBY
    772
  • image_crm_technotorgcomplex_453_0.webp
    Development based on Bitrix24 for the company TECHNOTORGKOMPLEKS
    1134

Vue.js Delivery Calculator for Bitrix: From Idea to Implementation

A user adds a product to cart, fills in data, then sees a 4000 ruble delivery cost — and closes the tab. 20% of carts are abandoned at this stage. According to Wikipedia, one in five users abandons cart due to unexpected delivery costs. Standard Bitrix shows rates only at checkout, but the customer wants to know the price immediately. Our experience: placing a calculator on the product card and in the cart increases conversion by 15–20%, and up to 35% for large or fragile goods.

We develop custom delivery calculators on Vue.js embedded into 1C-Bitrix. Vue.js renders tariff lists 5x faster than vanilla JavaScript (measurements from our practice). The component performs pre-calculation without page reload, determines the city by IP, and shows real-time cost. Contact us for a consultation on your project.

How to Implement Pre-calculation on the Product Card?

Calculation is performed via \Bitrix\Sale\Delivery\Services\Manager. We create a 'virtual' order without saving to the database:

class DeliveryCalculatorController extends \Bitrix\Main\Engine\Controller { public function calculateAction(array $items, string $locationCode): array { // Create a temporary order object without saving $order = \Bitrix\Sale\Order::create(SITE_ID, null); $basket = \Bitrix\Sale\Basket::create(SITE_ID); foreach ($items as $item) { $basketItem = $basket->createItem('catalog', $item['id']); $basketItem->setFields([ 'QUANTITY' => $item['qty'], 'CURRENCY' => 'RUB', ]); } $order->setBasket($basket); // Set the delivery address $shipmentCollection = $order->getShipmentCollection(); $shipment = $shipmentCollection->createItem(); $shipment->setField('DELIVERY_LOCATION', $locationCode); // Get list of available services with prices $deliveries = \Bitrix\Sale\Delivery\Services\Manager::getRestrictedObjectsList($shipment); $result = []; foreach ($deliveries as $delivery) { $calcResult = $delivery->calculate($shipment); $result[] = [ 'id' => $delivery->getId(), 'name' => $delivery->getName(), 'price' => $calcResult->isSuccess() ? $calcResult->getPrice() : null, 'days' => $calcResult->getPeriodDescription(), ]; } return ['deliveries' => $result]; } } 

Vue Component: Autocomplete and Display

<script setup> const props = defineProps(['productId', 'productWeight', 'productDimensions']); const city = ref(''); const locationCode = ref(''); const deliveryOptions = ref([]); const isLoading = ref(false); // City autocomplete via DaData or Bitrix location API async function onCityInput(query) { const locations = await locationApi.suggest(query); // User selects — save locationCode } async function calculate() { if (!locationCode.value) return; isLoading.value = true; const result = await deliveryApi.calculate({ items: [{ id: props.productId, qty: 1 }], locationCode: locationCode.value, }); deliveryOptions.value = result.deliveries; isLoading.value = false; } </script> 

Default City Detection

Bitrix automatically determines the location via \Bitrix\Sale\Location\LocationManager::getUserLocation() (GeoIP). Pass the city code to the component via data attributes:

$detectedLocation = \Bitrix\Sale\Location\LocationManager::getUserLocation(); echo '<div id="delivery-calc" data-location-code="' . $detectedLocation['CODE'] . '" data-location-name="' . htmlspecialchars($detectedLocation['NAME']['RU']) . '"></div>'; 

How to Set Up Caching for the Vue Calculator?

Delivery calculation is a slow operation due to external requests (CDEK, DPD). Cache for an hour:

$cacheKey = md5(json_encode($items) . $locationCode); $cache = \Bitrix\Main\Data\Cache::createInstance(); if ($cache->initCache(3600, $cacheKey, '/delivery-calc/')) { return $cache->getVars(); } // ... calculation ... $cache->startDataCache(); $cache->endDataCache($result); 

TTL — 1 hour, tariffs rarely change. This speeds up operation and reduces server load. If the delivery price is changed in Bitrix settings, clearing the composite site cache is sufficient.

Why Implement a Delivery Calculator?

One project — an online furniture store. Delivery cost varied from 800 to 5000 rubles depending on city and dimensions. Users added a product to cart just to find out the delivery cost, then left. After implementing the Vue calculator on the product card with IP-based city detection, the bounce rate at checkout dropped by 40%. The customer sees: 'Delivery to Krasnodar from 1200 rubles, 3–5 days' — and immediately makes a decision.

Characteristic Standard Bitrix Vue Calculator
Price display Only at checkout On product card and in cart
Geolocation Manual city entry Automatic IP detection
Speed Requires page reload Instant calculation without reload
Caching No Tagged caching for an hour
Service integration Only built-in Any API via REST adapters

Example configuration for connecting CDEK: in the Bitrix admin panel, create a delivery service with type 'CDEK'. Set the API key in settings. The Vue calculator automatically uses it during calculation.

What’s Included in the Work

Stage Result
Requirements analysis Specification of scenarios, list of delivery services
Design Vue component architecture, API request scheme
Development Calculator implementation, caching, geolocation
Testing Cross-browser testing, load testing
Deployment Installation on production server, SSL and cache configuration
Documentation API description, setup instruction, source code access
Support Free support for 2 weeks after delivery

Guarantee: all work uses certified Bitrix modules. Our experience — 10+ projects integrating Vue.js with 1C-Bitrix, average budget savings of 30% compared to development from scratch.

Case from Practice

A large goods store (furniture): delivery cost varied greatly by city and product dimensions. Users added items to cart only to check delivery cost, then left. The Vue calculator right on the product card with IP city detection: the user immediately sees 'Delivery to Krasnodar from 1200 rubles, 3–5 days'. Bounce rate at checkout decreased — client data.

Why We Use Vue.js

Vue.js provides reactive DOM updates, critical for smooth tariff display when changing city or products. According to Wikipedia, Vue.js is one of the lightest frameworks for embedding into existing projects. 1C-Bitrix documentation confirms that REST API makes it easy to connect Vue components with server logic.

Order the development of a delivery calculator for your online store. Contact us for a consultation and preliminary timeline. We will prepare a commercial proposal tailored to your catalog and delivery services.