PageSourceSearch

https://stimma.ua/bitrix/templates/stimma_new/js/ecommerce.js?v=1791592992

js stimma.ua collected 2026-10-10 00:43:35 UTC 1,605 bytes, 55 lines download raw bytes

1var viewItems = '';
2
3function addToCartEK(id, name, price, category, index, event, send = false, list_name = 'Items Category List', quantity = 1, basePrice = 0) {
4    let cnt = $('.card-counter').find('input').val();
5    cnt = parseInt(cnt);
6    if (!cnt || cnt < 1) cnt = 1;
7
8    // Расчёт скидки
9    let discountValue = basePrice - price;
10    if (discountValue < 0) discountValue = 0;
11
12    // Facebook Pixel only
13    fbq('track', 'AddToCart', {
14        currency: 'UAH',
15        content_ids: [id],
16        content_type: 'product',
17        content_category: `${category}`,
18        value: price * cnt
19    });
20
21    dataLayer.push({ ecommerce: null });
22    dataLayer.push({
23        event: "add_to_cart",
24        ecommerce: {
25            currency: "UAH",
26            value: price*cnt,
27            items: [
28                { 
29                    item_id: ""+id+"",
30                    item_name: `${name}`,
31                    affiliation: "STIMMA",
32                    discount: discountValue,
33                    index: cnt,
34                    item_brand: "STIMMA",
35                    item_category: `${category}`,
36                    item_list_id: id,
37                    item_list_name: `${name}`,
38                    price: basePrice,
39                    quantity: cnt
40                }
41            ]
42        }
43    });
44
45    // Отладка
46    console.log('add_to_cart FB only');
47
48    console.log({
49        item_id: id,
50        item_name: name,
51        price: basePrice,
52        discount: discountValue,
53        quantity: cnt
54    });
55}

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.