PageSourceSearch

https://rgk-shop.ru/local/templates/geon/components/bitrix/sale.basket.basket/header/script.js?17259557032020

js rgk-shop.ru collected 2026-10-08 16:32:11 UTC 2,020 bytes, 74 lines download raw bytes

1function deleteBasket(id)
2{
3	var arData = {};
4	arData["product"] =  id;
5	arData["action"] =  'removeCart';
6
7	$.ajax({
8		method: "GET",
9		dataType: 'json',
10		url: "/local/ajax/productHandler.php",
11		data: arData,
12	}).done(function (response) {
13		refreshHeaderBasket();
14		// Удаление данных об услугах товара
15		DeleteItemServices(id);
16		// Обновление состояния кнопок
17		updateButton(response.button);
18		// Пересчет корзины, если мы находимся на ее странице
19		if (BX.Sale && BX.Sale.BasketComponent) {
20			var itemId = $('[data-product-id="'+id+'"]').data('id');
21			if (itemId) {
22				BX.Sale.BasketComponent.sendRequest('refreshAjax', {fullRecalculation: 'N'});
23				BX.Sale.BasketComponent.deleteBasketItems([itemId]);
24			}
25		}
26	});
27    itcRemoveToCartCounter(id);
28}
29
30function DeleteItemServices(productId)
31{
32	var serviceList = BX.parseJSON(BX.getCookie('BITRIX_SM_service')) || [], i, matches;
33
34	for (i = 0; i < serviceList.length; i++) {
35		if (matches = serviceList[i].match(RegExp('^' + productId + '_(.*)$'))) {
36			DeleteService(matches[1], matches[0]);
37		}
38	}
39}
40
41function DeleteService(serviceId, serviceCode)
42{
43	var serviceList = BX.parseJSON(BX.getCookie('BITRIX_SM_service')) || [];
44
45	if (serviceList) {
46		serviceList.splice(serviceList.indexOf(serviceCode), 1);
47		BX.setCookie('BITRIX_SM_service', JSON.stringify(serviceList), {path: '/'});
48	}
49
50	SendAjaxRequest('removeCart', {product: serviceId});
51}
52
53function SendAjaxRequest(action, actionData)
54{
55	action = BX.type.isNotEmptyString(action) ? action : 'add2cart';
56
57	BX.ajax({
58		url: '/local/ajax/productHandler.php',
59		data: BX.merge(actionData, {
60			action: action
61		}),
62		method: 'POST',
63		dataType: 'json',
64		onsuccess: BX.delegate(function (response) {
65			if (response.status === 'error') {
66				return false;
67			}
68
69			if (BX.Sale && BX.Sale.BasketComponent) {
70				BX.Sale.BasketComponent.sendRequest('refreshAjax', {fullRecalculation: 'N'});
71			}
72		}, this)
73	});
74}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.