PageSourceSearch

https://deskcom.ru/bitrix/cache/js/s1/aspro_max/default_7141bc9d2a…df2ca50ec36c13b5df3c67_v1.js?17835547158751

js deskcom.ru collected 2026-10-06 00:29:45 UTC 8,751 bytes, 294 lines download raw bytes

1
2; /* Start:"a:4:{s:4:"full";s:104:"/bitrix/templates/aspro_max/components/bitrix/catalog.section/catalog_block_new/script.js?17515515258336";s:6:"source";s:89:"/bitrix/templates/aspro_max/components/bitrix/catalog.section/catalog_block_new/script.js";s:3:"min";s:0:"";s:3:"map";s:0:"";}"*/
3if(!funcDefined("sliceItemBlock")){
4	sliceItemBlock = function(){
5		/*
6		$('.cur .catalog_block .catalog_item_wrapp.catalog_item:visible').sliceHeight({
7			classNull: '.footer_button', 
8			item:'.cur .catalog_block .catalog_item_wrapp.catalog_item:visible', 
9			classes: [
10				'.item_info .item-title',
11				'.item_info .sa_block',
12				'.item_info .cost.prices',
13			],
14			mobile: true,
15			blockNull: {
16				class: 'big',
17				width: 2,
18			},
19			breakpoint: {
20				'(max-width: 600px)': {
21					blockNull: {
22						width: 1,
23					},
24					autoslicecount: false, 
25					slice: 999,
26				}
27			},
28		});
29		*/
30		
31		InitCustomScrollBar();
32	}
33}
34if(!funcDefined("sliceItemBlockSlide")){
35	sliceItemBlockSlide = function(options){
36		/*var settings = 
37		{
38			classNull: '.footer_button', 
39			item:'.cur .catalog_block.owl-carousel .catalog_item:not(.big)', 
40			classes: [
41				'.item_info .item-title',
42				'.item_info .sa_block',
43				'.item_info .cost.prices',
44			],
45			mobile: true,
46			autoslicecount: false, 
47			slice: 999,
48		};
49
50		if(options !== undefined) {
51			settings = Object.assign(settings, options);
52		}
53		$('.cur .catalog_block.owl-carousel .catalog_item_wrapp.catalog_item').sliceHeight(settings);
54		*/
55		InitCustomScrollBar();
56	}
57}
58
59$(document).ready(function(){
60	if(!('SelectOfferProp' in window) && typeof window.SelectOfferProp != 'function')
61	{
62		SelectOfferProp1 = function(){
63			// return false;
64			var _this = $(this),
65				obParams = {},
66				obSelect = {},
67				objUrl = parseUrlQuery(),
68				add_url = '',
69				container = _this.closest('.bx_catalog_item_scu');
70
71			/* request params */
72			obParams = {
73				'PARAMS': _this.closest('.js_wrapper_items').data('params'),
74				'ID': container.data('offer_id'),
75				'SITE_ID': container.data('site_id'),
76				'LINK_ID': container.data('id')+'_block',
77				'IBLOCK_ID': container.data('offer_iblockid'),
78				'PROPERTY_ID': container.data('propertyid'),
79				'DEPTH': _this.closest('.item_wrapper').index(),
80				'VALUE': _this.data('onevalue'),
81				'CLASS': 'inner_content',
82				'PICTURE': _this.closest('.catalog_item_wrapp').find('.thumb img').attr('src'),
83				'ARTICLE_NAME': _this.closest('.catalog_item_wrapp').find('.article_block').data('name'),
84				'ARTICLE_VALUE': _this.closest('.catalog_item_wrapp').find('.article_block').data('value'),
85			}
86			/**/
87
88			if("clear_cache" in objUrl)
89			{
90				if(objUrl.clear_cache == "Y")
91					add_url += "?clear_cache=Y";
92			}
93
94			/* save selected values */
95			for (i = 0; i < obParams.DEPTH+1; i++)
96			{
97				strName = 'PROP_'+container.find('.item_wrapper:eq('+i+') > div').data('id');
98				obSelect[strName] = container.find('.item_wrapper:eq('+i+') li.item.active').data('onevalue');
99				obParams[strName] = container.find('.item_wrapper:eq('+i+') li.item.active').data('onevalue');
100			}
101
102			// obParams.SELECTED = JSON.stringify(obSelect);
103			/**/
104			
105			_this.siblings().removeClass('active');
106			_this.addClass('active');
107
108			if(_this.attr('title'))
109			{
110				var skuVal = _this.attr('title').split(':')[1];
111				_this.closest('.item_wrapper').find('.show_class .val').text(skuVal);
112			}
113			else
114			{
115				var img_row = _this.find(' > i');
116				if(img_row.length && img_row.attr('title')) {
117					var skuVal = img_row.attr('title').split(':')[1];
118					_this.closest('.item_wrapper').find('.show_class .val').text(skuVal);
119				}
120			}
121
122			/* get sku */
123			$.ajax({
124				url: arMaxOptions['SITE_DIR']+'ajax/js_item_detail.php'+add_url,
125				type: 'POST',
126				data: obParams,
127			}).success(function(html){
128				var ob = BX.processHTML(html);BX.ajax.processScripts(ob.SCRIPT);
129			})
130		}
131		//$(document).on('click', '.bx_catalog_item_scu li.item', SelectOfferProp)
132	}
133});
134
135(function (window) {
136if (!window.JCCatalogSectionOnlyElement)
137{
138
139	window.JCCatalogSectionOnlyElement = function (arParams)
140	{
141		if (typeof arParams === 'object')
142		{
143			this.params = arParams;
144
145			this.obProduct = null;
146			this.set_quantity = 1;
147
148			this.currentPriceMode = '';
149			this.currentPrices = [];
150			this.currentPriceSelected = 0;
151			this.currentQuantityRanges = [];
152			this.currentQuantityRangeSelected = 0;
153
154			if (this.params.MESS)
155			{
156				this.mess = this.params.MESS;
157			}
158
159			this.init();
160		}
161	}
162	window.JCCatalogSectionOnlyElement.prototype = {
163		init: function()
164		{
165			var i = 0,
166				j = 0,
167				treeItems = null;
168
169			this.obProduct = BX(this.params.ID);
170
171			if(!!this.obProduct)
172			{
173				$(this.obProduct).find('.counter_wrapp .counter_block input').data('product', 'ob'+this.obProduct.id+'el');
174				this.currentPriceMode = this.params.ITEM_PRICE_MODE;
175				this.currentPrices = this.params.ITEM_PRICES;
176				this.currentQuantityRanges = this.params.ITEM_QUANTITY_RANGES;
177			}
178
179		},
180
181		setPriceAction: function()
182		{
183			this.set_quantity = this.params.MIN_QUANTITY_BUY;			
184			if($(this.obProduct).find('input[name=quantity]').length)
185				this.set_quantity = $(this.obProduct).find('input[name=quantity]').val();
186			
187			this.checkPriceRange(this.set_quantity);
188
189			$(this.obProduct).find('.not_matrix').hide();
190			$(this.obProduct).find('.with_matrix .price_value_block').html(getCurrentPrice(this.currentPrices[this.currentPriceSelected].PRICE, this.currentPrices[this.currentPriceSelected].CURRENCY, this.currentPrices[this.currentPriceSelected].PRINT_PRICE));
191
192			if($(this.obProduct).find('.with_matrix .discount'))
193			{
194				$(this.obProduct).find('.with_matrix .discount').html(getCurrentPrice(this.currentPrices[this.currentPriceSelected].BASE_PRICE, this.currentPrices[this.currentPriceSelected].CURRENCY, this.currentPrices[this.currentPriceSelected].PRINT_BASE_PRICE));
195			}
196
197			if(this.params.SHOW_DISCOUNT_PERCENT_NUMBER == 'Y')
198			{
199				if(this.currentPrices[this.currentPriceSelected].PERCENT > 0 && this.currentPrices[this.currentPriceSelected].PERCENT < 100)
200				{
201					if(!$(this.obProduct).find('.with_matrix .sale_block .sale_wrapper .value').length)
202						$('<div class="value"></div>').insertBefore($(this.obProduct).find('.with_matrix .sale_block .sale_wrapper .text'));
203
204					$(this.obProduct).find('.with_matrix .sale_block .sale_wrapper .value').html('-<span>'+this.currentPrices[this.currentPriceSelected].PERCENT+'</span>%');
205				}
206				else
207				{
208					if($(this.obProduct).find('.with_matrix .sale_block .sale_wrapper .value').length)
209						$(this.obProduct).find('.with_matrix .sale_block .sale_wrapper .value').remove();
210				}
211			}
212			$(this.obProduct).find('.with_matrix .sale_block .text .values_wrapper').html(getCurrentPrice(this.currentPrices[this.currentPriceSelected].DISCOUNT, this.currentPrices[this.currentPriceSelected].CURRENCY, this.currentPrices[this.currentPriceSelected].PRINT_DISCOUNT));
213			
214			if('NOT_SHOW' in this.params && this.params.NOT_SHOW != 'Y')
215				$(this.obProduct).find('.with_matrix').show();			
216
217			if(arMaxOptions['THEME']['SHOW_TOTAL_SUMM'] == 'Y')
218			{
219				if(typeof this.currentPrices[this.currentPriceSelected] !== 'undefined')
220					setPriceItem($(this.obProduct), this.set_quantity, this.currentPrices[this.currentPriceSelected].PRICE);
221			}
222		},
223
224		checkPriceRange: function(quantity)
225		{
226			if (typeof quantity === 'undefined'|| this.currentPriceMode != 'Q')
227				return;
228
229			var range, found = false;
230			
231			for (var i in this.currentQuantityRanges)
232			{
233				if (this.currentQuantityRanges.hasOwnProperty(i))
234				{
235					range = this.currentQuantityRanges[i];
236
237					if (
238						parseInt(quantity) >= parseInt(range.SORT_FROM)
239						&& (
240							range.SORT_TO == 'INF'
241							|| parseInt(quantity) <= parseInt(range.SORT_TO)
242						)
243					)
244					{
245						found = true;
246						this.currentQuantityRangeSelected = range.HASH;
247						break;
248					}
249				}
250			}
251
252			if (!found && (range = this.getMinPriceRange()))
253			{
254				this.currentQuantityRangeSelected = range.HASH;
255			}
256
257			for (var k in this.currentPrices)
258			{
259				if (this.currentPrices.hasOwnProperty(k))
260				{
261					if (this.currentPrices[k].QUANTITY_HASH == this.currentQuantityRangeSelected)
262					{
263						this.currentPriceSelected = k;
264						break;
265					}
266				}
267			}
268		},
269
270		getMinPriceRange: function()
271		{
272			var range;
273
274			for (var i in this.currentQuantityRanges)
275			{
276				if (this.currentQuantityRanges.hasOwnProperty(i))
277				{
278					if (
279						!range
280						|| parseInt(this.currentQuantityRanges[i].SORT_FROM) < parseInt(range.SORT_FROM)
281					)
282					{
283						range = this.currentQuantityRanges[i];
284					}
285				}
286			}
287
288			return range;
289		}
290	}
291}
292})(window);
293/* End */
294;; /* /bitrix/templates/aspro_max/components/bitrix/catalog.section/catalog_block_new/script.
294js?17515515258336*/

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.