21Loader::includeModule(
'catalog');
30Loc::loadMessages(__FILE__);
51 if (!
$USER->IsAdmin())
52 $strValTmp = Option::get(
'catalog',
'avail_content_groups');
54 Option::delete(
'catalog',
array());
56 while(
$zr =
$z->Fetch())
59 if (!
$USER->IsAdmin())
60 Option::set(
'catalog',
'avail_content_groups', $strValTmp,
'');
64 array(
"export_default_path", Loc::getMessage(
"CAT_EXPORT_DEFAULT_PATH"),
"/bitrix/catalog_export/",
array(
"text", 30)),
65 array(
"default_catalog_1c", Loc::getMessage(
"CAT_DEF_IBLOCK"),
"",
array(
"text", 30)),
66 array(
"deactivate_1c_no_price", Loc::getMessage(
"CAT_DEACT_NOPRICE"),
"N",
array(
"checkbox")),
71 $arAllOptions[] =
array(
"yandex_xml_period", Loc::getMessage(
"CAT_YANDEX_MARKET_XML_PERIOD"),
"24",
array(
"text", 5));
86 if (
$name ==
'export_default_path')
102 $boolExpPath =
false;
107 $boolExpPath =
false;
112 $boolExpPath =
false;
121 $strWarning .= Loc::getMessage(
'CAT_PATH_ERR_EXPORT_FOLDER_BAD').
'<br />';
137 $strYandexAgent =
'';
138 $strYandexAgent = trim($_POST[
'yandex_agent_file']);
139 if (!empty($strYandexAgent))
141 $strYandexAgent =
Rel2Abs(
'/', $strYandexAgent);
144 $strWarning .= Loc::getMessage(
'CAT_YANDEX_CUSTOM_AGENT_FILE_NOT_FOUND').
'<br />';
145 $strYandexAgent =
'';
148 Option::set(
'catalog',
'yandex_agent_file', $strYandexAgent,
'');
150 $num_catalog_levels = (isset($_POST[
'num_catalog_levels']) ? (int)$_POST[
'num_catalog_levels'] : 3);
151 if ($num_catalog_levels <= 0)
152 $num_catalog_levels = 3;
153 Option::set(
'catalog',
'num_catalog_levels', $num_catalog_levels,
'');
155 $serialSelectFields =
array(
156 'allowed_product_fields',
157 'allowed_price_fields',
158 'allowed_group_fields',
161 foreach ($serialSelectFields as $oneSelect)
163 $fieldsClear =
array();
164 $fieldsRaw = ($_POST[$oneSelect] ?? []);
165 if (!is_array($fieldsRaw))
167 $fieldsRaw =
array($fieldsRaw);
169 if (!empty($fieldsRaw))
171 foreach ($fieldsRaw as &$oneValue)
173 $oneValue = trim($oneValue);
174 if (
'' !== $oneValue)
176 $fieldsClear[] = $oneValue;
181 Option::set(
'catalog', $oneSelect, implode(
',', $fieldsClear),
'');
185 $updateViewedProductSettings = (isset($_POST[
'enable_viewed_products'])
186 && ($_POST[
'enable_viewed_products'] ===
'Y' || $_POST[
'enable_viewed_products'] ===
'N')
188 if ($updateViewedProductSettings)
191 $oldEnableViewedProducts = Option::get(
'catalog',
'enable_viewed_products');
196 $viewedPeriodChange =
false;
197 $viewedTimeChange =
false;
198 if (isset($_POST[
'viewed_period']) && is_string($_POST[
'viewed_period']))
203 $oldViewedPeriod = (int)Option::get(
'catalog',
'viewed_period');
209 if (isset($_POST[
'viewed_time']) && is_string($_POST[
'viewed_time']))
214 $oldViewedTime = (int)Option::get(
'catalog',
'viewed_time');
215 $viewedTimeChange = (
$viewedTime !== $oldViewedTime);
216 Option::set(
'catalog',
'viewed_time',
$viewedTime);
220 if ($viewedProductChange || $viewedPeriodChange || $viewedTimeChange)
223 '\Bitrix\Catalog\CatalogViewedProductTable::clearAgent();',
227 '\Bitrix\Catalog\CatalogViewedProductTable::clearAgent();',
230 (
int)Option::get(
'catalog',
'viewed_period') * 86400
234 if (isset($_POST[
'viewed_count']) && is_string($_POST[
'viewed_count']))
246 '\Bitrix\Catalog\CatalogViewedProductTable::clearAgent();',
254 $arOldAvailContentGroups =
array();
255 $oldAvailContentGroups = Option::get(
'catalog',
'avail_content_groups');
256 if ($oldAvailContentGroups !=
'')
257 $arOldAvailContentGroups = explode(
",", $oldAvailContentGroups);
258 if (!empty($arOldAvailContentGroups))
259 $arOldAvailContentGroups = array_fill_keys($arOldAvailContentGroups,
true);
261 $fieldsClear =
array();
262 if (isset($_POST[
'AVAIL_CONTENT_GROUPS']) && is_array($_POST[
'AVAIL_CONTENT_GROUPS']))
264 $fieldsClear = $_POST[
'AVAIL_CONTENT_GROUPS'];
266 if (!empty($fieldsClear))
268 foreach ($fieldsClear as $oneValue)
270 if (isset($arOldAvailContentGroups[$oneValue]))
271 unset($arOldAvailContentGroups[$oneValue]);
276 Option::set(
'catalog',
'avail_content_groups', implode(
',', $fieldsClear),
'');
277 if (!empty($arOldAvailContentGroups))
279 $arOldAvailContentGroups = array_keys($arOldAvailContentGroups);
280 foreach ($arOldAvailContentGroups as $oneValue)
286 $oldSimpleSearch = Option::get(
'catalog',
'product_form_simple_search');
287 $newSimpleSearch = $oldSimpleSearch;
288 $oldProcessingEvents = Option::get(
'catalog',
'enable_processing_deprecated_events');
289 $newProcessingEvents = $oldProcessingEvents;
290 $checkboxFields =
array(
291 'save_product_without_price',
292 'save_product_with_empty_price_range',
293 'show_catalog_tab_with_offers',
294 'use_offer_marking_code_group',
295 'default_product_vat_included',
296 'product_form_show_offers_iblock',
297 'product_form_simple_search',
298 'product_form_show_offer_name',
299 'enable_processing_deprecated_events',
303 $checkboxFields[] =
'product_card_slider_enabled';
307 $checkboxFields[] =
'show_store_shipping_center';
310 foreach ($checkboxFields as $oneCheckbox)
312 $value = (string)($_POST[$oneCheckbox] ??
'');
313 if ($value !==
'Y' && $value !==
'N')
315 Option::set(
'catalog', $oneCheckbox, $value,
'');
317 if ($oneCheckbox ===
'product_form_simple_search')
318 $newSimpleSearch = $value;
319 elseif ($oneCheckbox ===
'enable_processing_deprecated_events')
320 $newProcessingEvents = $value;
322 unset($value, $oneCheckbox);
324 if ($oldSimpleSearch != $newSimpleSearch)
326 if ($newSimpleSearch ==
'Y')
331 unset($oldSimpleSearch, $newSimpleSearch);
333 if ($oldProcessingEvents != $newProcessingEvents)
335 if ($newProcessingEvents ==
'Y')
340 unset($oldProcessingEvents, $newProcessingEvents);
342 $strUseStoreControlBeforeSubmit = Option::get(
'catalog',
'default_use_store_control');
343 $strUseStoreControl = (isset($_POST[
'use_store_control']) && (string)$_POST[
'use_store_control'] ===
'Y' ?
'Y' :
'N');
349 $countStores = (int)CCatalogStore::GetList(
array(),
array(
"ACTIVE" =>
'Y'),
array());
350 if ($countStores <= 0)
352 $arStoreFields =
array(
"TITLE" => Loc::getMessage(
"CAT_STORE_NAME"),
"ADDRESS" =>
" ");
353 $newStoreId = CCatalogStore::Add($arStoreFields);
356 CCatalogDocs::synchronizeStockQuantity($newStoreId);
360 $strWarning .= Loc::getMessage(
"CAT_STORE_ACTIVE_ERROR");
366 $strWarning .= Loc::getMessage(
"CAT_STORE_SYNCHRONIZE_WARNING_1");
371 $strWarning .= Loc::getMessage(
"CAT_STORE_DEACTIVATE_NOTICE_1");
380 $strEnableReservation = (isset($_POST[
'enable_reservation']) && (string)$_POST[
'enable_reservation'] ===
'Y' ?
'Y' :
'N');
384 CAgent::RemoveAgent(
'CSaleOrder::ClearProductReservedQuantity();',
'sale');
387 CAgent::AddAgent(
"CSaleOrder::ClearProductReservedQuantity();",
"sale",
"N", 86400,
"",
"Y");
394 $strDiscSaveApply =
'';
396 $strDiscSaveApply = (string)
$_REQUEST[
'discsave_apply'];
399 Option::set(
'catalog',
'discsave_apply', $strDiscSaveApply,
'');
404 $discountPercent =
'';
405 if (isset(
$_REQUEST[
'get_discount_percent_from_base_price']))
406 $discountPercent = (string)
$_REQUEST[
'get_discount_percent_from_base_price'];
407 if ($discountPercent ==
'Y' || $discountPercent ==
'N')
408 Option::set(
'catalog',
'get_discount_percent_from_base_price', $discountPercent,
'');
409 unset($discountPercent);
416 $arCurrentIBlocks =
array();
417 $arNewIBlocksList =
array();
423 $arIBlockItem =
array();
425 $rsIBlockSites = CIBlock::GetSite(
$iblock[
'ID']);
426 while ($arIBlockSite = $rsIBlockSites->Fetch())
433 $arIBlockItem =
array(
438 'IBLOCK_TYPE_ID' =>
$iblock[
'IBLOCK_TYPE_ID'],
440 'PRODUCT_IBLOCK_ID' => 0,
441 'SKU_PROPERTY_ID' => 0,
442 'OFFERS_IBLOCK_ID' => 0,
443 'OFFERS_PROPERTY_ID' => 0,
445 $arCurrentIBlocks[
$iblock[
'ID']] = $arIBlockItem;
450 'select' =>
array(
'IBLOCK_ID',
'PRODUCT_IBLOCK_ID',
'SKU_PROPERTY_ID',
'SUBSCRIPTION',
'YANDEX_EXPORT',
'VAT_ID')
455 if (!isset($arCurrentIBlocks[
$arCatalog[
'IBLOCK_ID']]))
463 $arCurrentIBlocks[
$arCatalog[
'IBLOCK_ID']][
'CATALOG'] =
'Y';
464 $arCurrentIBlocks[
$arCatalog[
'IBLOCK_ID']][
'PRODUCT_IBLOCK_ID'] =
$arCatalog[
'PRODUCT_IBLOCK_ID'];
468 $arCurrentIBlocks[
$arCatalog[
'PRODUCT_IBLOCK_ID']][
'OFFERS_IBLOCK_ID'] =
$arCatalog[
'IBLOCK_ID'];
469 $arCurrentIBlocks[
$arCatalog[
'PRODUCT_IBLOCK_ID']][
'OFFERS_PROPERTY_ID'] =
$arCatalog[
'SKU_PROPERTY_ID'];
474 foreach ($arCurrentIBlocks as
$iblock)
479 isset($_POST[
'IS_CATALOG_'.
$iblockId]) && $_POST[
'IS_CATALOG_'.$iblockId] ===
'Y'
484 isset($_POST[
'IS_CONTENT_'.
$iblockId]) && $_POST[
'IS_CONTENT_'.$iblockId] ===
'Y'
489 isset($_POST[
'YANDEX_EXPORT_'.
$iblockId]) && $_POST[
'YANDEX_EXPORT_'.$iblockId] ===
'Y'
504 isset($_POST[
'OFFERS_NAME_'.
$iblockId]) && is_string($_POST[
'OFFERS_NAME_'.
$iblockId])
509 isset($_POST[
'OFFERS_TYPE_'.
$iblockId]) && is_string($_POST[
'OFFERS_TYPE_'.
$iblockId])
514 isset($_POST[
'OFFERS_NEWTYPE_'.
$iblockId]) && is_string($_POST[
'OFFERS_NEWTYPE_'.
$iblockId])
515 ? trim($_POST[
'OFFERS_NEWTYPE_'.
$iblockId])
519 isset($_POST[
'CREATE_OFFERS_TYPE_'.
$iblockId]) && $_POST[
'CREATE_OFFERS_TYPE_'.$iblockId] ===
'Y'
524 $offers_iblock_id = (
525 isset($_POST[
'OFFERS_IBLOCK_ID_'.
$iblockId]) && is_string($_POST[
'OFFERS_IBLOCK_ID_'.
$iblockId])
526 ? (int)$_POST[
'OFFERS_IBLOCK_ID_'.
$iblockId]
531 $offers_iblock_id = 0;
534 $arNewIBlockItem =
array(
536 'CATALOG' => $is_cat,
537 'SUBSCRIPTION' => $is_cont,
538 'YANDEX_EXPORT' => $yan_exp,
539 'VAT_ID' => $cat_vat,
540 'OFFERS_IBLOCK_ID' => $offers_iblock_id,
541 'OFFERS_NAME' => $offer_name,
542 'OFFERS_TYPE' => $offer_type,
543 'OFFERS_NEW_TYPE' => $offer_new_type,
544 'CREATE_OFFERS_NEW_TYPE' => $flag_new_type,
545 'NEED_IS_REQUIRED' =>
'N',
546 'NEED_UPDATE' =>
'N',
550 $arNewIBlocksList[
$iblock[
'ID']] = $arNewIBlockItem;
555 foreach ($arCurrentIBlocks as
$intIBlockID => $arIBlockInfo)
557 if ((0 < $arIBlockInfo[
'PRODUCT_IBLOCK_ID']) && (
'Y' != $arNewIBlocksList[
$intIBlockID][
'CATALOG']))
561 $arOffersIBlocks =
array();
562 foreach ($arNewIBlocksList as
$intIBlockID => $arIBlockInfo)
564 if (0 < $arIBlockInfo[
'OFFERS_IBLOCK_ID'])
567 if (isset($arOffersIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']]))
571 'CAT_IBLOCK_OFFERS_ERR_TOO_MANY_PRODUCT_IBLOCK',
572 array(
'#OFFER#' => $arCurrentIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'INFO'])
577 $arOffersIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']] =
true;
584 'CAT_IBLOCK_OFFERS_ERR_SELF_MADE',
590 unset($arOffersIBlocks);
594 if (!
$USER->IsAdmin())
596 foreach ($arNewIBlocksList as
$intIBlockID => $arIBlockInfo)
602 'CAT_IBLOCK_OFFERS_ERR_CANNOT_CREATE_IBLOCK',
612 foreach ($arCurrentIBlocks as
$intIBlockID => $arIBlockInfo)
614 if (0 < $arIBlockInfo[
'PRODUCT_IBLOCK_ID'] && 0 != $arNewIBlocksList[
$intIBlockID][
'OFFERS_IBLOCK_ID'])
618 'CAT_IBLOCK_OFFERS_ERR_PRODUCT_AND_OFFERS',
619 array(
'#PRODUCT#' => $arIBlockInfo[
'INFO'])
627 foreach ($arNewIBlocksList as
$intIBlockID => $arIBlockInfo)
629 if (0 < $arIBlockInfo[
'OFFERS_IBLOCK_ID'] && 0 < $arCurrentIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'OFFERS_IBLOCK_ID'])
633 'CAT_IBLOCK_OFFERS_ERR_PRODUCT_AND_OFFERS',
634 array(
'#PRODUCT#' => $arCurrentIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'INFO'])
641 foreach ($arNewIBlocksList as
$intIBlockID => $arIBlockInfo)
643 if (0 < $arIBlockInfo[
'OFFERS_IBLOCK_ID'] && 0 < $arNewIBlocksList[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'OFFERS_IBLOCK_ID'])
647 'CAT_IBLOCK_OFFERS_ERR_PRODUCT_AND_OFFERS',
648 array(
'#PRODUCT#' => $arNewIBlocksList[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'INFO'])
655 foreach ($arNewIBlocksList as
$intIBlockID => $arIBlockInfo)
657 if (0 < $arIBlockInfo[
'OFFERS_IBLOCK_ID'] &&
CATALOG_NEW_OFFERS_IBLOCK_NEED == $arNewIBlocksList[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'OFFERS_IBLOCK_ID'])
661 'CAT_IBLOCK_OFFERS_ERR_PRODUCT_AND_OFFERS',
662 array(
'#PRODUCT#' => $arNewIBlocksList[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'INFO'])
671 foreach ($arNewIBlocksList as
$intIBlockID => $arIBlockInfo)
675 if (
'' == trim($arIBlockInfo[
'OFFERS_NAME']))
677 $arNewIBlocksList[
$intIBlockID][
'OFFERS_NAME'] = Loc::getMessage(
678 'CAT_IBLOCK_OFFERS_NAME_TEPLATE',
682 if (
'Y' == $arIBlockInfo[
'CREATE_OFFERS_NEW_TYPE'] &&
'' == trim($arIBlockInfo[
'OFFERS_NEW_TYPE']))
684 $arNewIBlocksList[
$intIBlockID][
'CREATE_OFFERS_NEW_TYPE'] =
'N';
687 if (
'N' == $arIBlockInfo[
'CREATE_OFFERS_NEW_TYPE'] &&
'' == trim($arIBlockInfo[
'OFFERS_TYPE']))
689 $arNewIBlocksList[
$intIBlockID][
'CREATE_OFFERS_NEW_TYPE'] =
'N';
698 foreach ($arNewIBlocksList as
$intIBlockID => $arIBlockInfo)
700 if (0 < $arIBlockInfo[
'OFFERS_IBLOCK_ID'])
702 $arDiffParent =
array();
703 $arDiffParent = array_diff($arCurrentIBlocks[
$intIBlockID][
'SITE_ID'],$arCurrentIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'SITE_ID']);
704 $arDiffOffer =
array();
705 $arDiffOffer = array_diff($arCurrentIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'SITE_ID'],$arCurrentIBlocks[
$intIBlockID][
'SITE_ID']);
706 if (!empty($arDiffParent) || !empty($arDiffOffer))
710 'CAT_IBLOCK_OFFERS_ERR_SITELIST_DEFFERENT',
713 '#OFFERS#' => $arCurrentIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'INFO']
723 foreach ($arNewIBlocksList as
$intIBlockID => $arIBlockInfo)
725 if (0 < $arIBlockInfo[
'OFFERS_IBLOCK_ID'])
730 $rsProps = CIBlockProperty::GetList(
array(),
array(
'IBLOCK_ID' => $arIBlockInfo[
'OFFERS_IBLOCK_ID'],
'PROPERTY_TYPE' =>
'E',
'LINK_IBLOCK_ID' =>
$intIBlockID,
'ACTIVE' =>
'Y',
'USER_TYPE' =>
'SKU'));
734 $arLastProp = $arProp;
737 if (
false !== $arProp)
739 $arLastProp = $arProp;
744 if (1 < $intCountProp)
749 'CAT_IBLOCK_OFFERS_ERR_TOO_MANY_LINKS',
751 '#OFFER#' => $arCurrentIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'INFO'],
756 elseif (1 == $intCountProp)
758 if (
'Y' == $arLastProp[
'MULTIPLE'])
763 'CAT_IBLOCK_OFFERS_ERR_LINKS_MULTIPLE',
765 '#OFFER#' => $arCurrentIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'INFO'],
770 elseif ((
'SKU' != $arLastProp[
'USER_TYPE']) || (
'CML2_LINK' != $arLastProp[
'XML_ID']))
774 $arNewIBlocksList[
$intIBlockID][
'OFFERS_PROP'] = $arLastProp[
'ID'];
778 $arNewIBlocksList[
$intIBlockID][
'OFFERS_PROP'] = $arLastProp[
'ID'];
781 elseif (0 == $intCountProp)
784 $arNewIBlocksList[
$intIBlockID][
'NEED_IS_REQUIRED'] =
'N';
792 $arNewOffers =
array();
795 $DB->StartTransaction();
796 foreach ($arNewIBlocksList as
$intIBlockID => $arIBlockInfo)
801 $arResultNewCatalogItem =
array();
802 if (
'Y' == $arIBlockInfo[
'CREATE_OFFERS_NEW_TYPE'])
807 $arIBlockInfo[
'OFFERS_TYPE'] = $arIBlockInfo[
'OFFERS_NEW_TYPE'];
812 'ID' => $arIBlockInfo[
'OFFERS_NEW_TYPE'],
818 $languageIterator = Main\Localization\LanguageTable::getList(
array(
819 'select' =>
array(
'ID',
'SORT'),
820 'filter' =>
array(
'=ACTIVE' =>
'Y'),
821 'order' =>
array(
'SORT' =>
'ASC')
823 while ($language = $languageIterator->fetch())
825 $arFields[
'LANG'][$language[
'ID']][
'NAME'] = $arIBlockInfo[
'OFFERS_NEW_TYPE'];
827 unset($language, $languageIterator);
830 $mxOffersType = $obIBlockType->Add(
$arFields);
835 'CAT_IBLOCK_OFFERS_ERR_NEW_IBLOCK_TYPE_NOT_ADD',
838 '#ERROR#' => $obIBlockType->LAST_ERROR
844 $arIBlockInfo[
'OFFERS_TYPE'] = $arIBlockInfo[
'OFFERS_NEW_TYPE'];
850 $arParentRights = CIBlock::GetGroupPermissions(
$intIBlockID);
851 foreach ($arParentRights as $keyRight => $valueRight)
853 if (
'U' == $valueRight)
855 $arParentRights[$keyRight] =
'W';
859 'SITE_ID' => $arCurrentIBlocks[
$intIBlockID][
'SITE_ID'],
860 'IBLOCK_TYPE_ID' => $arIBlockInfo[
'OFFERS_TYPE'],
861 'NAME' => $arIBlockInfo[
'OFFERS_NAME'],
863 'GROUP_ID' => $arParentRights,
866 "LIST_PAGE_URL" =>
'',
867 "SECTION_PAGE_URL" =>
'',
868 "DETAIL_PAGE_URL" =>
'#PRODUCT_URL#',
869 "INDEX_SECTION" =>
"N",
871 $obIBlock =
new CIBlock();
873 if ($mxOffersID ===
false)
877 'CAT_IBLOCK_OFFERS_ERR_IBLOCK_ADD',
880 '#ERR#' => $obIBlock->LAST_ERROR
886 $arResultNewCatalogItem =
array(
888 'SITE_ID' => $arCurrentIBlocks[
$intIBlockID][
'SITE_ID'],
889 'IBLOCK_TYPE_ID' =>
$arFields[
'IBLOCK_TYPE_ID'],
894 'YANDEX_EXPORT' =>
'N',
897 'SKU_PROPERTY_ID' => 0,
898 'NEED_IS_REQUIRED' =>
'N',
899 'NEED_UPDATE' =>
'Y',
900 'LINK_PROP' =>
false,
904 'IBLOCK_ID' => $mxOffersID,
905 'NAME' => Loc::getMessage(
'CAT_IBLOCK_OFFERS_TITLE_LINK_NAME'),
907 'PROPERTY_TYPE' =>
'E',
910 'CODE' =>
'CML2_LINK',
911 'XML_ID' =>
'CML2_LINK',
913 'USER_TYPE' =>
'SKU',
915 $obProp =
new CIBlockProperty();
921 'CAT_IBLOCK_OFFERS_ERR_CANNOT_CREATE_LINK',
923 '#OFFERS#' => $arResultNewCatalogItem[
'INFO'],
924 '#ERR#' => $obProp->LAST_ERROR
930 $arResultNewCatalogItem[
'SKU_PROPERTY_ID'] = $mxPropID;
931 $arResultNewCatalogItem[
'NEED_IS_REQUIRED'] =
'N';
932 $arResultNewCatalogItem[
'NEED_UPDATE'] =
'N';
933 $arResultNewCatalogItem[
'NEED_LINK'] =
'N';
939 $arNewOffers[$mxOffersID] = $arResultNewCatalogItem;
959 $DB->StartTransaction();
960 foreach ($arNewIBlocksList as
$intIBlockID => $arIBlockInfo)
962 if (0 < $arIBlockInfo[
'OFFERS_IBLOCK_ID'])
964 if (
'Y' == $arIBlockInfo[
'NEED_LINK'])
967 'IBLOCK_ID' => $arIBlockInfo[
'OFFERS_IBLOCK_ID'],
968 'NAME' => Loc::getMessage(
'CAT_IBLOCK_OFFERS_TITLE_LINK_NAME'),
970 'PROPERTY_TYPE' =>
'E',
973 'CODE' =>
'CML2_LINK',
974 'XML_ID' =>
'CML2_LINK',
976 'USER_TYPE' =>
'SKU',
978 $obProp =
new CIBlockProperty();
984 'CAT_IBLOCK_OFFERS_ERR_CANNOT_CREATE_LINK',
986 '#OFFERS#' => $arCurrentIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'INFO'],
987 '#ERR#' => $obProp->LAST_ERROR
993 $arNewIBlocksList[
$intIBlockID][
'OFFERS_PROP'] = $mxPropID;
994 $arNewIBlocksList[
$intIBlockID][
'NEED_IS_REQUIRED'] =
'N';
999 elseif (0 < $arIBlockInfo[
'OFFERS_PROP'])
1001 if (
'Y' == $arIBlockInfo[
'NEED_UPDATE'])
1003 $arPropFields =
array(
1004 'USER_TYPE' =>
'SKU',
1005 'XML_ID' =>
'CML2_LINK',
1007 $obProp =
new CIBlockProperty();
1008 $mxPropID = $obProp->Update($arIBlockInfo[
'OFFERS_PROP'],$arPropFields);
1013 'CAT_IBLOCK_OFFERS_ERR_MODIFY_PROP_IS_REQ',
1015 '#OFFERS#' => $arCurrentIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'INFO'],
1016 '#ERR#' => $obProp->LAST_ERROR
1037 foreach ($arNewIBlocksList as
$intIBlockID => $arIBlockInfo)
1039 $arCurrentIBlocks[
$intIBlockID][
'CATALOG'] = $arIBlockInfo[
'CATALOG'];
1040 $arCurrentIBlocks[
$intIBlockID][
'SUBSCRIPTION'] = $arIBlockInfo[
'SUBSCRIPTION'];
1041 $arCurrentIBlocks[
$intIBlockID][
'YANDEX_EXPORT'] = $arIBlockInfo[
'YANDEX_EXPORT'];
1042 $arCurrentIBlocks[
$intIBlockID][
'VAT_ID'] = $arIBlockInfo[
'VAT_ID'];
1044 foreach ($arNewIBlocksList as
$intIBlockID => $arIBlockInfo)
1046 if (0 < $arIBlockInfo[
'OFFERS_IBLOCK_ID'])
1048 $arCurrentIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'CATALOG'] =
'Y';
1049 $arCurrentIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'PRODUCT_IBLOCK_ID'] =
$intIBlockID;
1050 $arCurrentIBlocks[$arIBlockInfo[
'OFFERS_IBLOCK_ID']][
'SKU_PROPERTY_ID'] = $arIBlockInfo[
'OFFERS_PROP'];
1057 foreach ($arCurrentIBlocks as
$intIBlockID => $arIBlockInfo)
1059 if (0 < $arIBlockInfo[
'PRODUCT_IBLOCK_ID'])
1061 if (
$intIBlockID != $arNewIBlocksList[$arIBlockInfo[
'PRODUCT_IBLOCK_ID']][
'OFFERS_IBLOCK_ID'])
1069 $boolCatalogUpdate =
false;
1072 $DB->StartTransaction();
1074 foreach ($arCurrentIBlocks as
$intIBlockID => $arIBlockInfo)
1077 if (isset($arIBlockInfo[
'UNLINK']) &&
'Y' == $arIBlockInfo[
'UNLINK'])
1079 $boolFlag = $obCatalog->UnLinkSKUIBlock($arIBlockInfo[
'PRODUCT_IBLOCK_ID']);
1082 $arIBlockInfo[
'PRODUCT_IBLOCK_ID'] = 0;
1083 $arIBlockInfo[
'SKU_PROPERTY_ID'] = 0;
1084 $boolCatalogUpdate =
true;
1092 'CAT_IBLOCK_OFFERS_ERR_UNLINK_SKU',
1094 '#PRODUCT#' => $arIBlockInfo[
'INFO'],
1105 if ($boolExists && (
'Y' == $arIBlockInfo[
'CATALOG'] ||
'Y' == $arIBlockInfo[
'SUBSCRIPTION'] || 0 < $arIBlockInfo[
'PRODUCT_IBLOCK_ID']))
1107 $boolAttr = $obCatalog->Update(
1110 'IBLOCK_ID' => $arIBlockInfo[
'ID'],
1111 'YANDEX_EXPORT' => $arIBlockInfo[
'YANDEX_EXPORT'],
1112 'SUBSCRIPTION' => $arIBlockInfo[
'SUBSCRIPTION'],
1113 'VAT_ID' => $arIBlockInfo[
'VAT_ID'],
1114 'PRODUCT_IBLOCK_ID' => $arIBlockInfo[
'PRODUCT_IBLOCK_ID'],
1115 'SKU_PROPERTY_ID' => $arIBlockInfo[
'SKU_PROPERTY_ID']
1123 'CAT_IBLOCK_OFFERS_ERR_CAT_UPDATE',
1125 '#PRODUCT#' => $arIBlockInfo[
'INFO'],
1134 $arCurValues[
'SUBSCRIPTION'] != $arIBlockInfo[
'SUBSCRIPTION']
1135 || $arCurValues[
'PRODUCT_IBLOCK_ID'] != $arIBlockInfo[
'PRODUCT_IBLOCK_ID']
1136 || $arCurValues[
'YANDEX_EXPORT'] != $arIBlockInfo[
'YANDEX_EXPORT']
1137 || $arCurValues[
'VAT_ID'] != $arIBlockInfo[
'VAT_ID']
1140 $boolCatalogUpdate =
true;
1142 if ($arIBlockInfo[
'YANDEX_EXPORT']==
"Y")
1146 elseif ($boolExists && $arIBlockInfo[
'CATALOG']!=
"Y" && $arIBlockInfo[
'SUBSCRIPTION']!=
"Y" && 0 == $arIBlockInfo[
'PRODUCT_IBLOCK_ID'])
1151 $strWarning .= Loc::getMessage(
"CAT_DEL_CATALOG1").
' '.$arIBlockInfo[
'INFO'].
' '.Loc::getMessage(
"CAT_DEL_CATALOG2").
".<br />";
1155 $boolCatalogUpdate =
true;
1158 elseif ($arIBlockInfo[
'CATALOG']==
"Y" || $arIBlockInfo[
'SUBSCRIPTION']==
"Y" || 0 < $arIBlockInfo[
'PRODUCT_IBLOCK_ID'])
1160 $boolAttr = $obCatalog->Add(
array(
1161 'IBLOCK_ID' => $arIBlockInfo[
'ID'],
1162 'YANDEX_EXPORT' => $arIBlockInfo[
'YANDEX_EXPORT'],
1163 'SUBSCRIPTION' => $arIBlockInfo[
'SUBSCRIPTION'],
1164 'VAT_ID' => $arIBlockInfo[
'VAT_ID'],
1165 'PRODUCT_IBLOCK_ID' => $arIBlockInfo[
'PRODUCT_IBLOCK_ID'],
1166 'SKU_PROPERTY_ID' => $arIBlockInfo[
'SKU_PROPERTY_ID']
1173 array(
'#PRODUCT#',
'#ERROR#'),
1175 Loc::getMessage(
'CAT_IBLOCK_OFFERS_ERR_CAT_ADD')
1178 'CAT_IBLOCK_OFFERS_ERR_CAT_ADD',
1180 '#PRODUCT#' => $arIBlockInfo[
'INFO'],
1188 if ($arIBlockInfo[
'YANDEX_EXPORT']==
"Y") $bNeedAgent =
true;
1189 $boolCatalogUpdate =
true;
1207 if (!empty($arNewOffers))
1209 $DB->StartTransaction();
1210 foreach ($arNewOffers as $IntIBlockID => $arIBlockInfo)
1212 $boolAttr = $obCatalog->Add(
array(
'IBLOCK_ID' => $arIBlockInfo[
'ID'],
"YANDEX_EXPORT" => $arIBlockInfo[
'YANDEX_EXPORT'],
"SUBSCRIPTION" => $arIBlockInfo[
'SUBSCRIPTION'],
"VAT_ID" => $arIBlockInfo[
'VAT_ID'],
"PRODUCT_IBLOCK_ID" => $arIBlockInfo[
'PRODUCT_IBLOCK_ID'],
'SKU_PROPERTY_ID' => $arIBlockInfo[
'SKU_PROPERTY_ID']));
1218 'CAT_IBLOCK_OFFERS_ERR_CAT_ADD',
1220 '#PRODUCT#' => $arIBlockInfo[
'INFO'],
1229 if ($arIBlockInfo[
'YANDEX_EXPORT']==
"Y") $bNeedAgent =
true;
1230 $boolCatalogUpdate =
true;
1246 $strOK .= Loc::getMessage(
'CAT_IBLOCK_CATALOG_SUCCESSFULLY_UPDATE').
'<br />';
1249 CAgent::RemoveAgent(
'CCatalog::PreGenerateXML("yandex");',
'catalog');
1252 CAgent::AddAgent(
'CCatalog::PreGenerateXML("yandex");',
'catalog',
'N', (
int)Option::get(
'catalog',
'yandex_xml_period')*3600);
1255 if(isset($_POST[
'catalog_subscribe_repeated_notify']))
1257 $postValue = (string)$_POST[
'catalog_subscribe_repeated_notify'];
1258 if($postValue ===
'Y' || $postValue ===
'N')
1260 Option::set(
'catalog',
'subscribe_repeated_notify', $postValue);
1267 CAgent::RemoveAgent(
'CCatalog::PreGenerateXML("yandex");',
'catalog');
1271 CAgent::AddAgent(
'CCatalog::PreGenerateXML("yandex");',
'catalog',
'N', (
int)Option::get(
'catalog',
'yandex_xml_period') * 3600);
1272 $strOK .= Loc::getMessage(
'CAT_YANDEX_AGENT_ADD_SUCCESS').
'. ';
1276 $strWarning .= Loc::getMessage(
'CAT_YANDEX_AGENT_ADD_NO_EXPORT').
'. ';
1287 array(
"DIV" =>
"edit5",
"TAB" => Loc::getMessage(
"CO_TAB_5"),
"ICON" =>
"catalog_settings",
"TITLE" => Loc::getMessage(
"CO_TAB_5_TITLE")),
1288 array(
"DIV" =>
"edit1",
"TAB" => Loc::getMessage(
"CO_TAB_1"),
"ICON" =>
"catalog_settings",
"TITLE" => Loc::getMessage(
"CO_TAB_1_TITLE")),
1289 array(
"DIV" =>
"edit2",
"TAB" => Loc::getMessage(
"CO_TAB_2"),
"ICON" =>
"catalog_settings",
"TITLE" => Loc::getMessage(
"CO_TAB_2_TITLE"))
1292if (
$USER->IsAdmin())
1295 $aTabs[] =
array(
"DIV" =>
"edit3",
"TAB" => Loc::getMessage(
"CO_TAB_3"),
"ICON" =>
"catalog_settings",
"TITLE" => Loc::getMessage(
"CO_SALE_GROUPS"));
1296 $aTabs[] =
array(
"DIV" =>
"edit4",
"TAB" => Loc::getMessage(
"CO_TAB_RIGHTS"),
"ICON" =>
"catalog_settings",
"TITLE" => Loc::getMessage(
"CO_TAB_RIGHTS_TITLE"));
1304$currentSettings[
'save_product_with_empty_price_range'] = Option::get(
'catalog',
'save_product_with_empty_price_range');
1305$currentSettings[
'use_offer_marking_code_group'] = Option::get(
'catalog',
'use_offer_marking_code_group');
1306$currentSettings[
'default_product_vat_included'] = Option::get(
'catalog',
'default_product_vat_included');
1307$currentSettings[
'enable_processing_deprecated_events'] = Option::get(
'catalog',
'enable_processing_deprecated_events');
1308$currentSettings[
'product_card_slider_enabled'] = Option::get(
'catalog',
'product_card_slider_enabled');
1309$currentSettings[
'show_store_shipping_center'] = Option::get(
'catalog',
'show_store_shipping_center');
1328function showReservation(show)
1330 var obRowReservationPeriod = BX(
'tr_reservation_period'),
1331 obReservationType = BX(
'td_reservation_type'),
1332 titleQuantityDecrease =
'<?= CUtil::JSEscape(Loc::getMessage("CAT_PRODUCT_QUANTITY_DECREASE")); ?>',
1333 titleProductReserved =
'<?= CUtil::JSEscape(Loc::getMessage("CAT_PRODUCT_RESERVED")); ?>';
1336 if (!!obRowReservationPeriod)
1337 BX.style(obRowReservationPeriod,
'display', (show ?
'table-row' :
'none'));
1338 obRowReservationPeriod =
null;
1339 if (!!obReservationType)
1340 obReservationType.innerHTML = (show ? titleProductReserved : titleQuantityDecrease);
1341 obReservationType =
null;
1344function onClickReservation(el)
1346 showReservation(el.checked);
1349function onClickStoreControl(el)
1351 var obEnableReservation = BX(
'enable_reservation_y'),
1354 if (!obEnableReservation)
1361 obEnableReservation.checked =
true;
1365 if (obEnableReservation.hasAttribute(
'data-oldvalue'))
1367 oldValue = obEnableReservation.getAttribute(
'data-oldvalue');
1368 obEnableReservation.checked = (oldValue ===
'Y');
1371 showReservation(obEnableReservation.checked);
1372 obEnableReservation.disabled = el.checked;
1375function RestoreDefaults()
1377 if (confirm(
'<?= CUtil::JSEscape(Loc::getMessage("CAT_OPTIONS_BTN_HINT_RESTORE_DEFAULT_WARNING")); ?>'))
1378 window.location =
"<?= $APPLICATION->GetCurPage(); ?>?RestoreDefaults=Y&lang=<?= LANGUAGE_ID; ?>&mid=<?= urlencode($mid); ?>&<?= bitrix_sessid_get(); ?>";
1381<form method=
"POST" action=
"<?= $APPLICATION->GetCurPage(); ?>?lang=<?= LANGUAGE_ID; ?>&mid=<?= htmlspecialcharsbx($mid); ?>&mid_menu=1" name=
"ara">
1387 <td colspan=
"2"><?=Loc::getMessage(
"BX_CAT_SYSTEM_SETTINGS"); ?></td>
1390 <td
style=
"width: 40%;"><label
for=
"enable_processing_deprecated_events_y"><?=Loc::getMessage(
"BX_CAT_ENABLE_PROCESSING_DEPRECATED_EVENTS"); ?></label></td>
1392 <input type=
"hidden" name=
"enable_processing_deprecated_events" id=
"enable_processing_deprecated_events_n" value=
"N">
1393 <input type=
"checkbox" name=
"enable_processing_deprecated_events" id=
"enable_processing_deprecated_events_y" value=
"Y"<?=(
$currentSettings[
'enable_processing_deprecated_events'] ==
'Y' ?
' checked' :
''); ?>>
1397 <td colspan=
"2"><?= Loc::getMessage(
"CAT_PRODUCT_CARD"); ?></td>
1404 <td
style=
"width: 40%;"><label
for=
"product_card_slider_enabled"><?= Loc::getMessage(
"CAT_PRODUCT_CARD_SLIDER_ENABLED"); ?></label></td>
1406 <input type=
"hidden" name=
"product_card_slider_enabled" id=
"product_card_slider_enabled_n" value=
"N">
1407 <input type=
"checkbox" name=
"product_card_slider_enabled" id=
"product_card_slider_enabled_y" value=
"Y"<?=(
$currentSettings[
'product_card_slider_enabled'] ==
'Y') ?
' checked' :
''?>>
1414 <td
style=
"width: 40%;"><label
for=
"save_product_without_price_y"><?= Loc::getMessage(
"CAT_SAVE_PRODUCTS_WITHOUT_PRICE"); ?></label></td>
1416 <input type=
"hidden" name=
"save_product_without_price" id=
"save_product_without_price_n" value=
"N">
1417 <input type=
"checkbox" name=
"save_product_without_price" id=
"save_product_without_price_y" value=
"Y"<?= (
$strSaveProductWithoutPrice ===
'Y' ?
' checked' :
''); ?>>
1421 <td
style=
"width: 40%;"><label
for=
"save_product_with_empty_price_range_y"><?= Loc::getMessage(
"CAT_SAVE_PRODUCT_WITH_EMPTY_PRICE_RANGE"); ?></label></td>
1423 <input type=
"hidden" name=
"save_product_with_empty_price_range" id=
"save_product_with_empty_price_range_n" value=
"N">
1424 <input type=
"checkbox" name=
"save_product_with_empty_price_range" id=
"save_product_with_empty_price_range_y" value=
"Y"<?= (
$currentSettings[
'save_product_with_empty_price_range'] ===
'Y' ?
' checked' :
''); ?>>
1428 <td
style=
"width: 40%;">
1429 <span
id=
"hint_show_catalog_tab_with_offers"></span> <label
for=
"show_catalog_tab_with_offers"><?= Loc::getMessage(
"CAT_SHOW_CATALOG_TAB"); ?></label>
1432 <input type=
"hidden" name=
"show_catalog_tab_with_offers" id=
"show_catalog_tab_with_offers_n" value=
"N">
1433 <input type=
"checkbox" name=
"show_catalog_tab_with_offers" id=
"show_catalog_tab_with_offers_y" value=
"Y"<?= (
$strShowCatalogTab ===
'Y' ?
' checked' :
''); ?>>
1438 $check = (
$currentSettings[
'use_offer_marking_code_group'] ===
'Y' ?
' checked' :
'');
1441 <td
style=
"width: 40%;">
1442 <span
id=
"hint_use_offer_marking_code_group"></span> <label
for=
"use_offer_marking_code_group"><?= Loc::getMessage(
'CAT_USE_OFFER_MARKING_CODE_GROUP'); ?></label>
1445 <input type=
"hidden" name=
"use_offer_marking_code_group" id=
"use_offer_marking_code_group_n" value=
"N">
1446 <input type=
"checkbox" name=
"use_offer_marking_code_group" id=
"use_offer_marking_code_group_y" value=
"Y"<?= $check; ?>>
1453 <td
style=
"width: 40%;"><label
for=
"default_product_vat_included"><?= Loc::getMessage(
"CAT_PRODUCT_DEFAULT_VAT_INCLUDED"); ?></label></td>
1455 <input type=
"hidden" name=
"default_product_vat_included" id=
"default_product_vat_included_n" value=
"N">
1456 <input type=
"checkbox" name=
"default_product_vat_included" id=
"default_product_vat_included_y" value=
"Y"<?= (
$currentSettings[
'default_product_vat_included'] ===
'Y' ?
' checked' :
''); ?>>
1460 <td colspan=
"2"><?= Loc::getMessage(
'CAT_PRODUCT_CARD_DEFAULT_VALUES'); ?></td>
1463 <td
style=
"width: 40%;"><?= Loc::getMessage(
"CAT_ENABLE_QUANTITY_TRACE"); ?></td>
1465 <span
id=
"default_quantity_trace"><?= (
$strQuantityTrace ===
'Y' ? Loc::getMessage(
'CAT_PRODUCT_SETTINGS_STATUS_YES') : Loc::getMessage(
'CAT_PRODUCT_SETTINGS_STATUS_NO')); ?></span>
1469 <td
style=
"width: 40%;"><?= Loc::getMessage(
"CAT_ALLOW_CAN_BUY_ZERO_EXT"); ?></td>
1471 <span
id=
"default_can_buy_zero"><?= (
$strAllowCanBuyZero ===
'Y' ? Loc::getMessage(
'CAT_PRODUCT_SETTINGS_STATUS_YES') : Loc::getMessage(
'CAT_PRODUCT_SETTINGS_STATUS_NO')); ?></span>
1475 <td
style=
"width: 40%;"><?= Loc::getMessage(
"CAT_PRODUCT_SUBSCRIBE"); ?></td>
1477 <span
id=
"default_subscribe"><?= (
$strSubscribe ==
'Y' ? Loc::getMessage(
'CAT_PRODUCT_SETTINGS_STATUS_YES') : Loc::getMessage(
'CAT_PRODUCT_SETTINGS_STATUS_NO')); ?></span>
1487 <input
class=
"adm-btn-save" type=
"button" id=
"product_settings" value=
"<?= Loc::getMessage('CAT_PRODUCT_SETTINGS_CHANGE'); ?>">
1494 <td colspan=
"2"><?= Loc::getMessage(
"CAT_STORE_1"); ?></td>
1496<tr
id=
'cat_store_tr'>
1497 <td
style=
"width: 40%;"><label
for=
"use_store_control_y"><?= Loc::getMessage(
"CAT_USE_STORE_CONTROL_1"); ?></label></td>
1499 <input type=
"hidden" name=
"use_store_control" id=
"use_store_control_n" value=
"N">
1500 <input type=
"checkbox" onclick=
"onClickStoreControl(this);" name=
"use_store_control" id=
"use_store_control_y" value=
"Y"<?= (
$strUseStoreControl ===
'Y' ?
' checked' :
''); ?>>
1504 <td
style=
"width: 40%;">
1505 <span
id=
"hint_reservation"></span>&
nbsp;<label
for=
"enable_reservation"><?= Loc::getMessage(
"CAT_ENABLE_RESERVATION"); ?></label></td>
1507 <input type=
"hidden" name=
"enable_reservation" id=
"enable_reservation_n" value=
"N">
1508 <input type=
"checkbox" onclick=
"onClickReservation(this);" name=
"enable_reservation" id=
"enable_reservation_y" value=
"Y" data-oldvalue=
"<?= $strEnableReservation; ?>"<?= (
$strEnableReservation ===
'Y' ||
$strUseStoreControl ===
'Y' ?
' checked' :
''); ?><?= (
$strUseStoreControl ===
'Y' ?
' disabled' :
''); ?>>
1514 if (!(Loader::includeModule(
'crm') && !CCrmSaleHelper::isWithOrdersMode()))
1518 <td
id=
"td_reservation_type"><?php
1525 if (isset($reserveConditions[$currentReserveCondition]))
1527 echo htmlspecialcharsex($reserveConditions[$currentReserveCondition]);
1531 echo Loc::getMessage(
'BX_CAT_RESERVE_CONDITION_EMPTY');
1533 unset($reserveConditions, $currentReserveCondition);
1534 ?>&
nbsp;<a href=
"<?= $saleSettingsUrl; ?>#section_reservation"><?= Loc::getMessage(
'CAT_DISCOUNT_PERCENT_FROM_BASE_SALE'); ?></a>
1537 <tr
id=
"tr_reservation_period" style=
"display: <?= ($strUseStoreControl === 'Y' || $strEnableReservation === 'Y' ? 'table-row' : 'none'); ?>;">
1539 <?= Loc::getMessage(
"CAT_RESERVATION_CLEAR_PERIOD"); ?>
1550 $checked = (
$currentSettings[
'show_store_shipping_center'] ===
'Y' ?
' checked' :
'');
1552 <td
style=
"width: 40%;">
1553 <span
id=
"hint_show_store_shipping_center"></span> <label
for=
"show_store_shipping_center"><?= Loc::getMessage(
'CAT_SHOW_STORE_SHIPPING_CENTER'); ?></label>
1556 <input type=
"hidden" name=
"show_store_shipping_center" id=
"show_store_shipping_center_n" value=
"N">
1557 <input type=
"checkbox" name=
"show_store_shipping_center" id=
"show_store_shipping_center_y" value=
"Y"<?= $checked; ?>>
1567 <td colspan=
"2"><?= Loc::getMessage(
"CAT_DISCOUNT"); ?></td>
1570 <td
style=
"width: 40%;"><label
for=
"discsave_apply"><?= Loc::getMessage(
"CAT_DISCSAVE_APPLY"); ?></label></td>
1572 <
select name=
"discsave_apply" id=
"discsave_apply"><?php
1575 ?><option value=
"<?= $applyMode; ?>" <?= ($applyMode ==
$currentSettings[
'discsave_apply'] ?
'selected' :
''); ?>><?= $applyTitle; ?></option><?php
1585 <td
style=
"width: 40%;"><?= Loc::getMessage(
'CAT_DISCOUNT_PERCENT_FROM_BASE_PRICE'); ?></td>
1591 ? Loc::getMessage(
'CAT_DISCOUNT_PERCENT_FROM_BASE_PRICE_YES')
1592 : Loc::getMessage(
'CAT_DISCOUNT_PERCENT_FROM_BASE_PRICE_NO')
1593 );?>&
nbsp;<a href=
"<?= $saleSettingsUrl; ?>#section_discount"><?= Loc::getMessage(
'CAT_DISCOUNT_PERCENT_FROM_BASE_SALE'); ?></a><?php
1598 <input type=
"hidden" name=
"get_discount_percent_from_base_price" id=
"get_discount_percent_from_base_price_N" value=
"N">
1599 <input type=
"checkbox" name=
"get_discount_percent_from_base_price" id=
"get_discount_percent_from_base_price_Y" value=
"Y"<?= (
$currentSettings[
'get_discount_percent_from_base_price'] ===
'Y' ?
' checked' :
''); ?>>
1614 <td colspan=
"2"><?= Loc::getMessage(
"CAT_VIEWED_PRODUCTS_TITLE"); ?></td>
1617 <td
style=
"width: 40%"><?= Loc::getMessage(
'CAT_ENABLE_VIEWED_PRODUCTS'); ?></td>
1619 <input type=
"hidden" name=
"enable_viewed_products" id=
"enable_viewed_products_n" value=
"N">
1620 <input type=
"checkbox" name=
"enable_viewed_products" id=
"enable_viewed_products_y" value=
"Y" <?= (
$enableViewedProducts ===
'Y' ?
' checked' :
''); ?>>
1623<tr
id=
"tr_viewed_time" style=
"display: <?=$styleViewed; ?>;">
1624 <td
style=
"width: 40%;"><label
for=
"viewed_time"><?= Loc::getMessage(
"CAT_VIEWED_TIME"); ?></label></td>
1626 <input type=
"text" name=
"viewed_time" id=
"viewed_time" value=
"<?=$viewedTime; ?>" size=
"10">
1629<tr
id=
"tr_viewed_count" style=
"display: <?=$styleViewed; ?>;">
1630 <td
style=
"width: 40%;"><label
for=
"viewed_count"><?= Loc::getMessage(
"CAT_VIEWED_COUNT"); ?></label></td>
1632 <input type=
"text" name=
"viewed_count" id=
"viewed_count" value=
"<?=$viewedCount; ?>" size=
"10">
1635<tr
id=
"tr_viewed_period" style=
"display: <?=$styleViewed; ?>;">
1636 <td
style=
"width: 40%;"><label
for=
"viewed_period"><?= Loc::getMessage(
"CAT_VIEWED_PERIOD"); ?></label></td>
1638 <input type=
"text" name=
"viewed_period" id=
"viewed_period" value=
"<?=$viewedPeriod; ?>" size=
"10">
1642 <td colspan=
"2"><?= Loc::getMessage(
"CAT_PRODUCT_FORM_SETTINGS"); ?></td>
1645 <td
style=
"width: 40%;"><?= Loc::getMessage(
'CAT_SHOW_OFFERS_IBLOCK'); ?></td>
1647 <input type=
"hidden" name=
"product_form_show_offers_iblock" id=
"product_form_show_offers_iblock_n" value=
"N">
1648 <input type=
"checkbox" name=
"product_form_show_offers_iblock" id=
"product_form_show_offers_iblock_y" value=
"Y" <?= (
$strShowOffersIBlock ===
'Y' ?
' checked' :
''); ?>>
1652 <td
style=
"width: 40%;"><?= Loc::getMessage(
'CAT_SIMPLE_SEARCH'); ?></td>
1654 <input type=
"hidden" name=
"product_form_simple_search" id=
"product_form_simple_search_n" value=
"N">
1655 <input type=
"checkbox" name=
"product_form_simple_search" id=
"product_form_simple_search_y" value=
"Y" <?= (
$strSimpleSearch ===
'Y' ?
' checked' :
''); ?>>
1659 <td
style=
"width: 40%;"><?= Loc::getMessage(
'CAT_SHOW_OFFERS_NAME'); ?></td>
1661 <input type=
"hidden" name=
"product_form_show_offer_name" id=
"product_form_show_offer_name_n" value=
"N">
1662 <input type=
"checkbox" name=
"product_form_show_offer_name" id=
"product_form_show_offer_name_y" value=
"Y" <?= (
$searchShowOfferName ===
'Y' ?
' checked' :
''); ?>>
1666 <td colspan=
"2"><?= Loc::getMessage(
"CAT_PRODUCT_SUBSCRIBE_TITLE"); ?></td>
1669 <td
style=
"width: 40%;"><?= Loc::getMessage(
'CAT_PRODUCT_SUBSCRIBE_LABLE_REPEATED_NOTIFY'); ?></td>
1671 <input type=
"hidden" name=
"catalog_subscribe_repeated_notify" value=
"N">
1672 <input type=
"checkbox" name=
"catalog_subscribe_repeated_notify" value=
"Y"
1673 <?= (Option::get(
'catalog',
'subscribe_repeated_notify') ===
'Y' ?
' checked' :
''); ?>>
1680 <td colspan=
"2"><?= Loc::getMessage(
"CAT_COMMON_EXPIMP_SETTINGS"); ?></td>
1689 <td
style=
"width: 40%;"><?= (
$type[0] ===
'checkbox' ?
'<label for="'.htmlspecialcharsbx(
$Option[0]).
'">'.
$Option[1].
'</label>' :
$Option[1]); ?></td>
1692 if (
$Option[0] ==
'export_default_path')
1697 "event" =>
"BtnClickExpPath",
1698 "arResultDest" =>
array(
"FORM_NAME" =>
"ara",
"FORM_ELEMENT_NAME" =>
$Option[0]),
1702 "showUploadTab" =>
false,
1703 "showAddToMenuTab" =>
false,
1705 "allowAllFiles" =>
true,
1706 "SaveConfig" =>
true,
1709 ?><input type=
"text" name=
"<?= htmlspecialcharsbx($Option[0]); ?>" size=
"50" maxlength=
"255" value=
"<?= htmlspecialcharsbx($val); ?>">&
nbsp;<input type=
"button" name=
"browseExpPath" value=
"..." onClick=
"BtnClickExpPath()"><?php
1713 if (
$type[0] ===
'checkbox'):
1715 <input type=
"checkbox" name=
"<?= htmlspecialcharsbx($Option[0]); ?>" id=
"<?= htmlspecialcharsbx($Option[0]);?>" value=
"Y"<?= (
$val ===
'Y' ?
' checked' :
''); ?>>
1719 <input type=
"text" size=
"<?= $type[1]; ?>" maxlength=
"255" value=
"<?= htmlspecialcharsbx($val); ?>" name=
"<?= htmlspecialcharsbx($Option[0]); ?>">
1723 <textarea rows=
"<?= $type[1]; ?>" cols=
"<?= $type[2]; ?>" name=
"<?= htmlspecialcharsbx($Option[0]); ?>"><?=
htmlspecialcharsbx(
$val); ?></textarea>
1734 <td
style=
"width: 40%;"><?=Loc::getMessage(
"CAT_DEF_OUTFILE")?></td>
1739 <
select name=
"default_outfile_action">
1741 <option value=
"H"<?= (
$default_outfile_action ===
'H' ?
' selected' :
''); ?>><?=Loc::getMessage(
"CAT_DEF_OUTFILE_H")?></option>
1742 <option value=
"F"<?= (
$default_outfile_action ===
'F' ?
' selected' :
''); ?>><?= Loc::getMessage(
"CAT_DEF_OUTFILE_F"); ?></option>
1752 <td
style=
"width: 40%;">
1754 $yandex_agent_file = Option::get(
'catalog',
'yandex_agent_file');
1758 "event" =>
"BtnClick",
1759 "arResultDest" =>
array(
"FORM_NAME" =>
"ara",
"FORM_ELEMENT_NAME" =>
"yandex_agent_file"),
1763 "showUploadTab" =>
true,
1764 "showAddToMenuTab" =>
false,
1765 "fileFilter" =>
'php',
1766 "allowAllFiles" =>
true,
1767 "SaveConfig" =>
true,
1771 echo Loc::getMessage(
"CAT_YANDEX_CUSTOM_AGENT_FILE")?></td>
1772 <td><input type=
"text" name=
"yandex_agent_file" size=
"50" maxlength=
"255" value=
"<?= $yandex_agent_file; ?>">&
nbsp;<input type=
"button" name=
"browse" value=
"..." onClick=
"BtnClick()"></td>
1779 <td colspan=
"2"><?= Loc::getMessage(
"CO_PAR_IE_CSV"); ?></td>
1782 <td
style=
"width: 40%; vertical-align: top;"><?= Loc::getMessage(
"CO_PAR_DPP_CSV"); ?></td>
1783 <td
style=
"vertical-align: top;">
1786$strVal = Option::get(
'catalog',
'allowed_product_fields');
1795?><
select name=
"allowed_product_fields[]" multiple
size=
"8"><?php
1798 ?><option value=
"<?= htmlspecialcharsbx($oneField['value']); ?>"<?= (isset(
$arVal[$oneField[
'value']]) ?
' selected' :
''); ?>><?= htmlspecialcharsex($oneField[
'name']); ?></option><?php
1800if (isset($oneField))
1807 <td
style=
"width: 40%; vertical-align: top;"><?= Loc::getMessage(
"CO_AVAIL_PRICE_FIELDS"); ?></td>
1808 <td
style=
"vertical-align: top;">
1811$strVal = Option::get(
'catalog',
'allowed_price_fields');
1816?><
select name=
"allowed_price_fields[]" multiple
size=
"5"><?php
1820 ?><option value=
"<?=htmlspecialcharsbx($oneField['value']); ?>"<?=(isset(
$arVal[$oneField[
'value']]) ?
' selected' :
''); ?>><?=htmlspecialcharsex($oneField[
'name']); ?></option><?php
1825 ?><option value=
"<?=htmlspecialcharsbx($oneField['value']); ?>"<?=(isset(
$arVal[$oneField[
'value']]) ?
' selected' :
''); ?>><?=htmlspecialcharsex($oneField[
'name']); ?></option><?php
1832 <td
style=
"width: 40%;"><?= Loc::getMessage(
"CAT_NUM_CATALOG_LEVELS"); ?></td>
1834 $strVal = (int)Option::get(
'catalog',
'num_catalog_levels');
1835 ?><input type=
"text" size=
"5" maxlength=
"5" value=
"<?= $strVal; ?>" name=
"num_catalog_levels">
1839 <td
style=
"width: 40%; vertical-align: top;"><?= Loc::getMessage(
"CO_PAR_DPG_CSV"); ?></td>
1843$strVal = Option::get(
'catalog',
'allowed_group_fields');
1849?><
select name=
"allowed_group_fields[]" multiple
size=
"9"><?php
1852 ?><option value=
"<?= htmlspecialcharsbx($oneField['value']); ?>"<?= (isset(
$arVal[$oneField[
'value']]) ?
' selected' :
''); ?>><?= htmlspecialcharsex($oneField[
'name']); ?></option><?php
1854if (isset($oneField))
1861 <td
style=
"width: 40%; vertical-align: top;"><?= Loc::getMessage(
"CO_PAR_DV1_CSV"); ?></td>
1862 <td
style=
"vertical-align: top;">
1865$strVal = Option::get(
'catalog',
'allowed_currencies');
1870?><
select name=
"allowed_currencies[]" multiple
size=
"5"><?php
1871foreach (
Currency\CurrencyManager::getCurrencyList() as $currencyId => $currencyName)
1873 ?><option value=
"<?=htmlspecialcharsbx($currencyId); ?>"<?=(isset(
$arVal[$currencyId]) ?
' selected' :
''); ?>><?php
1898 $arLIDList =
array();
1899 $arWithLinks =
array();
1900 $arWithoutLinks =
array();
1901 $rsIBlockSites = CIBlock::GetSite(
$arIBlock[
'ID']);
1902 while ($arIBlockSite = $rsIBlockSites->Fetch())
1904 $arLIDList[] = $arIBlockSite[
'LID'];
1905 $arWithLinks[] =
'<a href="/bitrix/admin/site_edit.php?LID='.urlencode($arIBlockSite[
'LID']).
'&lang='.LANGUAGE_ID.
'" title="'.Loc::getMessage(
"CO_SITE_ALT").
'">'.
htmlspecialcharsbx($arIBlockSite[
"LID"]).
'</a>';
1909 'SITE_ID' => $arLIDList,
1910 'WITH_LINKS' => implode(
' ',$arWithLinks),
1911 'WITHOUT_LINKS' => implode(
' ',$arWithoutLinks),
1914 $arIBlockItem =
array(
1916 'IBLOCK_TYPE_ID' =>
$arIBlock[
'IBLOCK_TYPE_ID'],
1921 'IS_CATALOG' =>
'N',
1922 'IS_CONTENT' =>
'N',
1923 'YANDEX_EXPORT' =>
'N',
1925 'PRODUCT_IBLOCK_ID' => 0,
1926 'SKU_PROPERTY_ID' => 0,
1927 'OFFERS_IBLOCK_ID' => 0,
1929 'OFFERS_PROPERTY_ID' => 0
1935 'select' =>
array(
'IBLOCK_ID',
'PRODUCT_IBLOCK_ID',
'SKU_PROPERTY_ID',
'SUBSCRIPTION',
'YANDEX_EXPORT',
'VAT_ID')
1939 $arOneCatalog[
'IBLOCK_ID'] = (int)$arOneCatalog[
'IBLOCK_ID'];
1943 $arOneCatalog[
'VAT_ID'] = (int)$arOneCatalog[
'VAT_ID'];
1944 $arOneCatalog[
'PRODUCT_IBLOCK_ID'] = (int)$arOneCatalog[
'PRODUCT_IBLOCK_ID'];
1945 $arOneCatalog[
'SKU_PROPERTY_ID'] = (int)$arOneCatalog[
'SKU_PROPERTY_ID'];
1949 $arRecurring[] =
'['.$arIBlockItem[
'ID'].
'] '.$arIBlockItem[
'NAME'];
1956 $arIBlock[
'YANDEX_EXPORT'] = $arOneCatalog[
'YANDEX_EXPORT'];
1957 $arIBlock[
'VAT_ID'] = $arOneCatalog[
'VAT_ID'];
1958 $arIBlock[
'PRODUCT_IBLOCK_ID'] = $arOneCatalog[
'PRODUCT_IBLOCK_ID'];
1959 $arIBlock[
'SKU_PROPERTY_ID'] = $arOneCatalog[
'SKU_PROPERTY_ID'];
1960 if (0 < $arOneCatalog[
'PRODUCT_IBLOCK_ID'])
1964 $arOwnBlock[
'OFFERS_IBLOCK_ID'] = $arOneCatalog[
'IBLOCK_ID'];
1965 $arOwnBlock[
'OFFERS_PROPERTY_ID'] = $arOneCatalog[
'SKU_PROPERTY_ID'];
1993 $strRecurring = Loc::getMessage(
'SMALL_BUSINESS_RECURRING_ERR_LIST').
'<ul><li>'.implode(
'</li><li>',
$arRecurring).
'</li></ul>'.Loc::getMessage(
'SMALL_BUSINESS_RECURRING_ERR_LIST_CLEAR');
1995 "MESSAGE" => Loc::getMessage(
"SMALL_BUSINESS_RECURRING_ERR"),
1996 "DETAILS" => $strRecurring,
2009function ib_checkFldActivity(
id, flag)
2011 var Cat = BX(
'IS_CATALOG_' +
id +
'_Y');
2012 var Cont = BX(
'IS_CONTENT_' +
id +
'_Y');
2013 var Yand = BX(
'YANDEX_EXPORT_' +
id +
'_Y');
2014 var
Vat = BX(
'VAT_ID_' +
id);
2018 if (!!Cat && !!Cont)
2021 Cont.checked =
false;
2027 if (!!Cat && !!Cont)
2034 var bActive = Cat.checked;
2036 Yand.disabled = !bActive;
2038 Vat.disabled = !bActive;
2041function show_add_offers(
id, obj)
2043 var value = obj.options[obj.selectedIndex].value;
2044 var add_form = document.getElementById(
'offers_add_info_'+
id);
2045 if (undefined !== add_form)
2049 add_form.style.display =
'block';
2053 add_form.style.display =
'none';
2057function change_offers_ibtype(obj,ID)
2059 var value = obj.value;
2062 document.forms.ara[
'OFFERS_TYPE_' + ID].disabled =
true;
2063 document.forms.ara[
'OFFERS_NEWTYPE_' + ID].disabled =
false;
2065 else if (
'N' === value)
2067 document.forms.ara[
'OFFERS_TYPE_' + ID].disabled =
false;
2068 document.forms.ara[
'OFFERS_NEWTYPE_' + ID].disabled =
true;
2072<table
width=
"100%" cellspacing=
"0" cellpadding=
"0" border=
"0" class=
"internal">
2073 <tr
class=
"heading">
2074 <td><?=Loc::getMessage(
"CAT_IBLOCK_SELECT_NAME")?></td>
2075 <td><?=Loc::getMessage(
"CAT_IBLOCK_SELECT_CAT")?></td>
2076 <td><?=Loc::getMessage(
"CAT_IBLOCK_SELECT_OFFERS")?></td><?php
2079 ?><td><?=Loc::getMessage(
"CO_SALE_CONTENT") ?></td><?php
2084 <td><?=Loc::getMessage(
"CAT_IBLOCK_SELECT_YANDEX_EXPORT")?></td>
2087 <td><?=Loc::getMessage(
"CAT_IBLOCK_SELECT_VAT")?></td>
2094 <td>[<a
title=
"<?= Loc::getMessage("CO_IB_TYPE_ALT
"); ?>" href=
"/bitrix/admin/iblock_admin.php?type=<?= urlencode($res["IBLOCK_TYPE_ID
"]); ?>&lang=<?= LANGUAGE_ID; ?>&admin=Y"><?=
$res[
"IBLOCK_TYPE_ID"]; ?></a>]
2095 &
nbsp;[<?=
$res[
"ID"]; ?>] <a
title=
"<?= Loc::getMessage("CO_IB_ELEM_ALT
"); ?>" href=
"<?= CIBlock::GetAdminElementListLink($res["ID
"], array('find_section_section' => '0', 'admin' => 'Y')); ?>"><?=
$res[
"NAME"]; ?></a> (<?=
$arIBlockSitesList[
$res[
'ID']][
'WITH_LINKS']; ?>)
2096 <input type=
"hidden" name=
"IS_OFFERS_<?= $res["ID
"]; ?>" value=
"<?= $res['IS_OFFERS']; ?>" />
2098 <td
style=
"text-align: center;"><input type=
"hidden" name=
"IS_CATALOG_<?= $res["ID
"]; ?>" id=
"IS_CATALOG_<?= $res["ID
"]; ?>_N" value=
"N"><input type=
"checkbox" name=
"IS_CATALOG_<?= $res["ID
"]; ?>" id=
"IS_CATALOG_<?= $res["ID
"]; ?>_Y" onclick=
"ib_checkFldActivity('<?=$res['ID']?>', 0)"<?= (
'Y' ==
$res[
'IS_CATALOG'] ?
' checked="checked"' :
''); ?><?= (
'Y' ==
$res[
'IS_OFFERS'] ?
' disabled="disabled"' :
''); ?>value=
"Y" /></td>
2099 <td
style=
"text-align: center;"><
select id=
"OFFERS_IBLOCK_ID_<?= $res["ID
"]; ?>" name=
"OFFERS_IBLOCK_ID_<?= $res["ID
"]; ?>" class=
"typeselect" <?= (
'Y' ==
$res[
'IS_OFFERS'] ?
'disabled="disabled"' :
'onchange="show_add_offers('.$res[
"ID"].
',this);"'); ?>
style=
"width: 100%;">
2100 <option value=
"0" <?= (0 ==
$res[
'OFFERS_IBLOCK_ID'] ?
'selected' :
''); ?>><?= Loc::getMessage(
'CAT_IBLOCK_OFFERS_EMPTY'); ?></option>
2102 if (
'Y' !=
$res[
'IS_OFFERS'])
2104 if (
$USER->IsAdmin())
2106 ?><option value=
"<?= CATALOG_NEW_OFFERS_IBLOCK_NEED; ?>"><?= Loc::getMessage(
'CAT_IBLOCK_OFFERS_NEW')?></option><?php
2110 if ($value[
'ID'] !=
$res[
'OFFERS_IBLOCK_ID'])
2113 (
'Y' != $value[
'IS_CATALOG'])
2114 || (
'N' == $value[
'ACTIVE'])
2115 || (
'Y' == $value[
'IS_OFFERS'])
2116 || (0 < $value[
'OFFERS_IBLOCK_ID'])
2117 || (
$res[
'ID'] == $value[
'ID'])
2118 || (0 < $value[
'PRODUCT_IBLOCK_ID'])
2125 $arDiffParent =
array();
2126 $arDiffParent = array_diff($value[
'SITE_ID'],
$res[
'SITE_ID']);
2127 $arDiffOffer =
array();
2128 $arDiffOffer = array_diff(
$res[
'SITE_ID'],$value[
'SITE_ID']);
2129 if (!empty($arDiffParent) || !empty($arDiffOffer))
2135 ?><option value=
"<?= (int)$value['ID']; ?>"<?= (
$value[
'ID'] ==
$res[
'OFFERS_IBLOCK_ID'] ?
' selected' :
''); ?>><?=
$value[
'FULL_NAME']; ?></option><?php
2142 <div
id=
"offers_add_info_<?= $res["ID
"]; ?>" style=
"display: none; width: 98%; margin: 0 1%;"><table
class=
"internal" style=
"width: 100%;"><tbody>
2143 <tr><td
style=
"text-align: right; width: 25%;"><?= Loc::getMessage(
'CAT_IBLOCK_OFFERS_TITLE'); ?>:</td><td
style=
"text-align: left; width: 75%;"><input type=
"text" name=
"OFFERS_NAME_<?= $res["ID
"]; ?>" value=
"" style=
"width: 98%; margin: 0 1%;" /></td></tr>
2144 <tr><td
style=
"text-align: left; width: 100%;" colspan=
"2"><input type=
"radio" value=
"N" id=
"CREATE_OFFERS_TYPE_N_<?= $res["ID
"]; ?>" name=
"CREATE_OFFERS_TYPE_<?= $res["ID
"]; ?>" checked=
"checked" onclick=
"change_offers_ibtype(this,<?= $res["ID
"]; ?>);"><label
for=
"CREATE_OFFERS_TYPE_N_<?= $res["ID
"]; ?>"><?= Loc::getMessage(
'CAT_IBLOCK_OFFERS_OLD_IBTYPE'); ?></label></td></tr>
2146 <tr><td
style=
"text-align: left; width: 100%;" colspan=
"2"><input type=
"radio" value=
"Y" id=
"CREATE_OFFERS_TYPE_Y_<?= $res["ID
"]; ?>" name=
"CREATE_OFFERS_TYPE_<?= $res["ID
"]; ?>" onclick=
"change_offers_ibtype(this,<?= $res["ID
"]; ?>);"><label
for=
"CREATE_OFFERS_TYPE_Y_<?= $res["ID
"]; ?>"><?= Loc::getMessage(
'CAT_IBLOCK_OFFERS_NEW_IBTYPE'); ?></label></td></tr>
2147 <tr><td
style=
"text-align: right; width: 25%;"><?= Loc::getMessage(
'CAT_IBLOCK_OFFERS_NEWTYPE'); ?>:</td><td
style=
"text-align: left; width: 75%;"><input type=
"text" name=
"OFFERS_NEWTYPE_<?= $res["ID
"]; ?>" value=
"" style=
"width: 98%; margin: 0 1%;" disabled=
"disabled" /></td></tr>
2148 </tbody></table></div></td><?php
2151 ?><td
style=
"text-align: center;"><input type=
"hidden" name=
"IS_CONTENT_<?= $res["ID
"]; ?>" id=
"IS_CONTENT_<?= $res["ID
"]; ?>_N" value=
"N"><input type=
"checkbox" name=
"IS_CONTENT_<?= $res["ID
"]; ?>" id=
"IS_CONTENT_<?= $res["ID
"]; ?>_Y" onclick=
"ib_checkFldActivity('<?=$res['ID']?>', 1)"<?= (
$res[
"IS_CONTENT"] ===
'Y' ?
' checked' :
''); ?> value=
"Y" /></td><?php
2155 ?><input type=
"hidden" name=
"IS_CONTENT_<?= $res["ID
"]; ?>" value=
"N" id=
"IS_CONTENT_<?= $res["ID
"]; ?>_N"><?php
2160 <td
style=
"text-align: center;">
2161 <input type=
"hidden" name=
"YANDEX_EXPORT_<?= $res["ID
"]; ?>" id=
"YANDEX_EXPORT_<?= $res["ID
"]; ?>_N">
2162 <input type=
"checkbox" name=
"YANDEX_EXPORT_<?= $res["ID
"]; ?>" id=
"YANDEX_EXPORT_<?= $res["ID
"]; ?>_Y"<?= (
$res[
'IS_CATALOG'] ===
'N' ?
' disabled="disabled"' :
''); ?><?= (
$res[
"YANDEX_EXPORT"] ===
'Y' ?
' checked' :
''); ?> value=
"Y" />
2165 <input type=
"hidden" name=
"YANDEX_EXPORT_<?= $res["ID
"]; ?>" id=
"YANDEX_EXPORT_<?= $res["ID
"]; ?>_N" value=
"N">
2179if (
$USER->IsAdmin())
2186 $strVal = Option::get(
'catalog',
'avail_content_groups');
2190 $groupIterator = Main\GroupTable::getList([
2191 'select' => [
'ID',
'NAME',
'C_SORT'],
2192 'filter' => [
'!=ID' => 2,
'=ANONYMOUS' =>
'N'],
2193 'order' => [
'C_SORT' =>
'ASC',
'NAME' =>
'ASC']
2195 while ($arUserGroups = $groupIterator->fetch())
2197 $arUserGroups[
"ID"] = (int)$arUserGroups[
"ID"];
2200 <td
style=
"width: 40%;"><label
for=
"user_group_<?=$arUserGroups["ID
"]?>"><?=
htmlspecialcharsEx($arUserGroups[
"NAME"])?></label> [<a href=
"group_edit.php?ID=<?=$arUserGroups["ID
"]?>&lang=<?=LANGUAGE_ID?>" title=
"<?=Loc::getMessage("CO_USER_GROUP_ALT
")?>"><?=$arUserGroups[
"ID"]?></a>]:</td>
2201 <td><input type=
"checkbox" id=
"user_group_<?=$arUserGroups["ID
"]?>" name=
"AVAIL_CONTENT_GROUPS[]"<?= (in_array($arUserGroups[
"ID"],
$arVal) ?
' checked' :
''); ?> value=
"<?= $arUserGroups["ID
"] ?>"></td>
2205 unset($arUserGroups, $groupIterator);
2210 require_once(
$_SERVER[
"DOCUMENT_ROOT"].
"/bitrix/modules/main/admin/group_rights2.php");
2216<input type=
"submit" class=
"adm-btn-save" <?= (
$bReadOnly ?
' disabled' :
''); ?> name=
"Update" value=
"<?= Loc::getMessage("CAT_OPTIONS_BTN_SAVE
"); ?>">
2217<input type=
"hidden" name=
"Update" value=
"Y">
2218<input type=
"reset" name=
"reset" value=
"<?= Loc::getMessage("CAT_OPTIONS_BTN_RESET
"); ?>">
2219<input type=
"button"<?= (
$bReadOnly ?
' disabled' :
''); ?>
title=
"<?= Loc::getMessage("CAT_OPTIONS_BTN_HINT_RESTORE_DEFAULT
"); ?>" onclick=
"RestoreDefaults();" value=
"<?= Loc::getMessage("CAT_OPTIONS_BTN_RESTORE_DEFAULT
"); ?>">
2223 BX(
'hint_use_offer_marking_code_group'),
2224 '<?=CUtil::JSEscape(Loc::getMessage('USE_OFFER_MARKING_CODE_GROUP_HINT
')); ?>'
2226BX.hint_replace(BX(
'hint_reservation'),
'<?=CUtil::JSEscape(Loc::getMessage('CAT_ENABLE_RESERVATION_HINT
')); ?>');
2227BX.hint_replace(BX(
'hint_show_catalog_tab_with_offers'),
'<?=CUtil::JSEscape(Loc::getMessage('CAT_ENABLE_SHOW_CATALOG_TAB_WITH_OFFERS
')); ?>');
2228BX.hint_replace(BX(
'hint_show_store_shipping_center'),
'<?=CUtil::JSEscape(Loc::getMessage('CAT_SHOW_STORE_SHIPPING_CENTER_HINT
')); ?>');
2237 'select' =>
array(
'CNT'),
2239 new Main\
Entity\ExpressionField(
'CNT',
'COUNT(*)')
2244?><h2><?=Loc::getMessage(
"COP_SYS_ROU"); ?></h2>
2252 "TAB" => Loc::getMessage(
"COP_TAB2_YANDEX_AGENT"),
2253 "ICON" =>
"catalog_settings",
2254 "TITLE" => Loc::getMessage(
"COP_TAB2_YANDEX_AGENT_TITLE")
2262 "TAB" => Loc::getMessage(
"COP_TAB_RECALC"),
2263 "ICON" =>
"catalog_settings",
2264 "TITLE" => Loc::getMessage(
"COP_TAB_RECALC_TITLE")
2271 "TAB" => Loc::getMessage(
"CAT_QUANTITY_CONTROL_TAB"),
2272 "ICON" =>
"catalog_settings",
2273 "TITLE" => Loc::getMessage(
"CAT_QUANTITY_CONTROL")
2277 function catClearQuantity(el, action)
2279 var waiter_parent = BX.findParent(el, BX.is_relative),
2280 pos = BX.pos(el, !!waiter_parent);
2281 var iblockId = BX(
"catalogs_id").value;
2282 if (action ===
'clearStore')
2284 iblockId = BX(
"catalogs_store_id").value;
2287 sessid: BX.bitrix_sessid(),
2292 if (action ===
'clearStore')
2294 var obStore = BX(
'stores_id');
2297 dateURL.storeId = obStore.value;
2305 el.bxwaiter = (waiter_parent || document.body).appendChild(BX.create(
'DIV', {
2306 props: {className:
'adm-btn-load-img'},
2308 top: parseInt((pos.bottom + pos.top)/2 - 5, 10) +
'px',
2309 left: parseInt((pos.right + pos.left)/2 - 9, 10) +
'px'
2312 BX.addClass(el,
'adm-btn-load');
2314 '/bitrix/admin/cat_quantity_control.php?lang=<?= LANGUAGE_ID; ?>',
2316 catClearQuantityResult
2320 function catClearQuantityResult(result)
2322 if (result.length > 0)
2324 var res = eval(
'('+result+
')' );
2326 BX(res).setAttribute(
'class',
'adm-btn');
2327 if (el.bxwaiter && el.bxwaiter.parentNode)
2329 el.bxwaiter.parentNode.removeChild(el.bxwaiter);
2332 el.disabled =
false;
2349 <tr><td
style=
"text-align: left;"><?php
2350 $arAgentInfo =
false;
2351 $rsAgents = CAgent::GetList(
array(),
array(
'MODULE_ID' =>
'catalog',
'NAME' =>
'CCatalog::PreGenerateXML("yandex");'));
2352 if ($arAgent = $rsAgents->Fetch())
2354 $arAgentInfo = $arAgent;
2356 if (!is_array($arAgentInfo) || empty($arAgentInfo))
2358 ?><form name=
"agent_form" method=
"POST" action=
"<?= $APPLICATION->GetCurPage(); ?>?mid=<?=htmlspecialcharsbx($mid)?>&lang=<?= LANGUAGE_ID; ?>">
2360 <input type=
"submit" class=
"adm-btn-save" name=
"agent_start" value=
"<?= Loc::getMessage('CAT_AGENT_START'); ?>"<?= (
$bReadOnly ?
' disabled' :
''); ?>>
2365 echo Loc::getMessage(
'CAT_AGENT_ACTIVE').
': '.($arAgentInfo[
'ACTIVE'] ==
'Y' ? Loc::getMessage(
"MAIN_YES") : Loc::getMessage(
"MAIN_NO")).
'<br>';
2366 if ($arAgentInfo[
'LAST_EXEC'])
2368 echo Loc::getMessage(
'CAT_AGENT_LAST_EXEC').
': '.($arAgentInfo[
'LAST_EXEC'] ?:
'').
'<br>';
2369 echo Loc::getMessage(
'CAT_AGENT_NEXT_EXEC').
': '.($arAgentInfo[
'NEXT_EXEC'] ?:
'').
'<br>';
2373 echo Loc::getMessage(
'CAT_AGENT_WAIT_START').
'<br>';
2377 $strYandexFile = str_replace(
'//',
'/', Option::get(
'catalog',
'export_default_path').
'/yandex.php');
2378 if (file_exists(
$_SERVER[
'DOCUMENT_ROOT'].$strYandexFile))
2380 echo Loc::getMessage(
2381 'CAT_AGENT_FILEPATH',
2383 '#FILE#' =>
'<a href="'.$strYandexFile.
'">'.$strYandexFile.
'</a>'
2389 echo Loc::getMessage(
'CAT_AGENT_FILE_ABSENT').
'<br>';
2392 echo Loc::getMessage(
'CAT_AGENT_EVENT_LOG').
': ';
2394 ?><a href=
"/bitrix/admin/event_log.php?lang=<?= LANGUAGE_ID; ?>&set_filter=Y<?= CCatalogEvent::GetYandexAgentFilter(); ?>"><?= Loc::getMessage(
'CAT_AGENT_EVENT_LOG_SHOW_ERROR'); ?></a>
2404 ?><tr><td
style=
"text-align: left;"><?php
2408 ?><h4<?=$firstTop; ?>><?=Loc::getMessage(
'CAT_PROC_REINDEX_DISCOUNT'); ?></h4>
2409 <input
class=
"adm-btn-save" type=
"button" id=
"discount_reindex" value=
"<?=Loc::getMessage('CAT_PROC_REINDEX_DISCOUNT_BTN'); ?>">
2410 <p><?=Loc::getMessage(
'CAT_PROC_REINDEX_DISCOUNT_ALERT'); ?></p><?php
2415 ?><h4<?=$firstTop; ?>><?=Loc::getMessage(
'CAT_PROC_REINDEX_CATALOG'); ?></h4>
2416 <input
class=
"adm-btn-save" type=
"button" id=
"catalog_reindex" value=
"<?=Loc::getMessage('CAT_PROC_REINDEX_CATALOG_BTN'); ?>">
2417 <p><?=Loc::getMessage(
'CAT_PROC_REINDEX_CATALOG_ALERT'); ?></p><?php
2420 ?><h4><?=Loc::getMessage(
'CAT_PROC_REINDEX_SETS_AVAILABLE'); ?></h4>
2421 <input
class=
"adm-btn-save" type=
"button" id=
"sets_reindex" value=
"<?=Loc::getMessage('CAT_PROC_REINDEX_SETS_AVAILABLE_BTN'); ?>">
2422 <p><?=Loc::getMessage(
'CAT_PROC_REINDEX_SETS_AVAILABLE_ALERT'); ?></p><?php
2429 $userListID =
array();
2430 $strQuantityUser =
'';
2431 $strQuantityReservedUser =
'';
2433 $strClearQuantityDate =
'';
2434 $strClearQuantityReservedDate =
'';
2435 $strClearStoreDate =
'';
2437 $clearQuantityUser = (int)Option::get(
'catalog',
'clear_quantity_user');
2438 if ($clearQuantityUser < 0)
2439 $clearQuantityUser = 0;
2440 $userListID[$clearQuantityUser] =
true;
2442 $clearQuantityReservedUser = (int)Option::get(
'catalog',
'clear_reserved_quantity_user');
2443 if ($clearQuantityReservedUser < 0)
2444 $clearQuantityReservedUser = 0;
2445 $userListID[$clearQuantityReservedUser] =
true;
2447 $clearStoreUser = (int)Option::get(
'catalog',
'clear_store_user');
2448 if ($clearStoreUser < 0)
2449 $clearStoreUser = 0;
2450 $userListID[$clearStoreUser] =
true;
2452 if (isset($userListID[0]))
2453 unset($userListID[0]);
2454 if (!empty($userListID))
2456 $strClearQuantityDate = Option::get(
'catalog',
'clear_quantity_date');
2457 $strClearQuantityReservedDate = Option::get(
'catalog',
'clear_reserved_quantity_date');
2458 $strClearStoreDate = Option::get(
'catalog',
'clear_store_date');
2460 $arUserList =
array();
2464 $USER->CanDoOperation(
'view_subordinate_users')
2465 ||
$USER->CanDoOperation(
'view_all_users')
2466 ||
$USER->CanDoOperation(
'edit_all_users')
2467 ||
$USER->CanDoOperation(
'edit_subordinate_users')
2469 $userIterator = Main\UserTable::getList(
array(
2470 'select' =>
array(
'ID',
'LOGIN',
'NAME',
'LAST_NAME',
'SECOND_NAME'),
2471 'filter' =>
array(
'ID' => array_keys($userListID))
2473 while ($arOneUser = $userIterator->fetch())
2475 $arOneUser[
'ID'] = (int)$arOneUser[
'ID'];
2477 $arUserList[$arOneUser[
'ID']] =
'['.$arOneUser[
'ID'].
'] <a href="/bitrix/admin/user_edit.php?lang='.LANGUAGE_ID.
'&ID='.$arOneUser[
'ID'].
'">'.
CUser::FormatName($strNameFormat, $arOneUser).
'</a>';
2479 $arUserList[$arOneUser[
'ID']] =
'['.$arOneUser[
'ID'].
'] '.
CUser::FormatName($strNameFormat, $arOneUser);
2482 if (isset($arUserList[$clearQuantityUser]))
2483 $strQuantityUser = $arUserList[$clearQuantityUser];
2485 if (isset($arUserList[$clearQuantityReservedUser]))
2486 $strQuantityReservedUser = $arUserList[$clearQuantityReservedUser];
2487 if (isset($arUserList[$clearStoreUser]))
2488 $strStoreUser = $arUserList[$clearStoreUser];
2490 $boolStoreExists =
false;
2491 $arStores =
array();
2495 'ADDRESS' => Loc::getMessage(
"CAT_ALL_STORES"),
2499 array(
'SORT' =>
'ASC',
'ID' =>
'ASC'),
2500 array(
'ACTIVE' =>
'Y'),
2503 array(
'ID',
'TITLE',
'ADDRESS',
'SORT')
2505 while ($arStore = $rsStores->GetNext())
2507 $boolStoreExists =
true;
2508 $arStores[] = $arStore;
2514 <td><?= Loc::getMessage(
"CAT_SELECT_CATALOG") ?>:</td>
2516 <
select style=
"max-width: 300px" id=
"catalogs_id" name=
"catalogs_id" <?=(
$bReadOnly ?
' disabled' :
''); ?>>
2521 echo
'<option value="'.$arOneCatalog[
'ID'].
'">'.htmlspecialcharsex($arOneCatalog[
"NAME"]).
' ('.
$arIBlockSitesList[$arOneCatalog[
'ID']][
'WITHOUT_LINKS'].
')</option>';
2523 unset($arOneCatalog);
2530 <td
style=
"width: 40%;"><?= Loc::getMessage(
"CAT_CLEAR_QUANTITY"); ?>:</td>
2532 <input type=
"button" value=
"<?= Loc::getMessage("CAT_CLEAR_ACTION
"); ?>" id=
"cat_clear_quantity_btn" onclick=
"catClearQuantity(this, 'clearQuantity')">
2534 if (0 < $clearQuantityUser)
2536 ?><span
style=
"font-size: smaller;"><?=$strQuantityUser;?>&
nbsp;<?= $strClearQuantityDate; ?></span><?php
2542 <td
style=
"width: 40%;"><?= Loc::getMessage(
"CAT_CLEAR_RESERVED_QUANTITY"); ?></td>
2544 <input type=
"button" value=
"<?= Loc::getMessage("CAT_CLEAR_ACTION
"); ?>" id=
"cat_clear_reserved_quantity_btn" onclick=
"catClearQuantity(this, 'clearReservedQuantity')">
2546 if (0 < $clearQuantityReservedUser)
2548 ?><span
style=
"font-size: smaller;"><?=$strQuantityReservedUser;?>&
nbsp;<?= $strClearQuantityReservedDate; ?></span><?php
2553 <tr
class=
"heading">
2554 <td colspan=
"2"><?= Loc::getMessage(
"CAT_CLEAR_STORE"); ?></td>
2557 if ($boolStoreExists)
2561 <td><?= Loc::getMessage(
"CAT_SELECT_CATALOG") ?>:</td>
2563 <
select style=
"max-width: 300px" id=
"catalogs_store_id" name=
"catalogs_store_id" <?=(
$bReadOnly ?
' disabled' :
''); ?>>
2567 echo
'<option value="'.$arOneCatalog[
'ID'].
'">'.htmlspecialcharsex($arOneCatalog[
"NAME"]).
' ('.
$arIBlockSitesList[$arOneCatalog[
'ID']][
'WITHOUT_LINKS'].
')</option>';
2569 unset($arOneCatalog);
2575 <td><?= Loc::getMessage(
"CAT_SELECT_STORE") ?>:</td>
2577 <
select style=
"max-width: 300px;" id=
"stores_id" name=
"stores_id" <?=(
$bReadOnly ?
' disabled' :
''); ?>>
2581 $store = (
$val[
"TITLE"] !=
'') ?
$val[
"TITLE"].
" (".
$val[
"ADDRESS"].
")" :
$val[
"ADDRESS"];
2582 echo
'<option value="'.$val[
'ID'].
'">'.$store.
'</option>';
2590 <td><?= Loc::getMessage(
"CAT_CLEAR_STORE") ?>:</td>
2592 <input type=
"button" value=
"<?= Loc::getMessage("CAT_CLEAR_ACTION
"); ?>" id=
"cat_clear_store_btn" onclick=
"catClearQuantity(this, 'clearStore')">
2594 if (0 < $clearStoreUser)
2596 ?><span
style=
"font-size: smaller;"><?=$strStoreUser;?>&
nbsp;<?=$strClearStoreDate;?></span><?php
2607 <td colspan=
"2"><?= Loc::getMessage(
"CAT_STORE_LIST_IS_EMPTY"); ?></td>
2615function showDiscountReindex()
2617 var obDiscount, params;
2621 sessid: BX.bitrix_sessid()
2625 title:
'<?= CUtil::JSEscape(Loc::getMessage('CAT_POPUP_WINDOW_CLOSE_BTN
')); ?>',
2628 action:
function () {
2629 this.parentWindow.Close();
2633 obDiscount =
new BX.CAdminDialog({
2634 'content_url':
'/bitrix/admin/cat_discount_convert.php?lang=<?= LANGUAGE_ID; ?>&format=Y',
2635 'content_post': params,
2643function showSetsAvailableReindex()
2645 var obWindow, params;
2649 sessid: BX.bitrix_sessid()
2653 title:
'<?= CUtil::JSEscape(Loc::getMessage('CAT_POPUP_WINDOW_CLOSE_BTN
')); ?>',
2656 action:
function () {
2657 this.parentWindow.Close();
2661 obWindow =
new BX.CAdminDialog({
2662 'content_url':
'/bitrix/tools/catalog/sets_available.php?lang=<?= LANGUAGE_ID; ?>',
2663 'content_post': params,
2672function showCatalogReindex()
2674 var obWindow, params;
2678 sessid: BX.bitrix_sessid()
2682 title:
'<?= CUtil::JSEscape(Loc::getMessage('CAT_POPUP_WINDOW_CLOSE_BTN
')); ?>',
2685 action:
function () {
2686 this.parentWindow.Close();
2690 obWindow =
new BX.CAdminDialog({
2691 'content_url':
'/bitrix/tools/catalog/catalog_reindex.php?lang=<?= LANGUAGE_ID; ?>',
2692 'content_post': params,
2701function showProductSettings()
2703 var obWindow, params;
2707 sessid: BX.bitrix_sessid()
2711 title:
'<?= CUtil::JSEscape(Loc::getMessage('CAT_POPUP_WINDOW_CLOSE_BTN
')); ?>',
2714 action:
function () {
2715 this.parentWindow.Close();
2719 obWindow =
new BX.CAdminDialog({
2720 'content_url':
'/bitrix/tools/catalog/product_settings.php?lang=<?= LANGUAGE_ID; ?>',
2721 'content_post': params,
2730function changeProductSettings(params)
2733 if (!BX.type.isPlainObject(params))
2739 ob.innerHTML = BX.util.htmlspecialchars(params[i]);
2743function showViewed()
2745 var enableViewed = BX(
'enable_viewed_products_y'),
2746 viewedTime = BX(
'tr_viewed_time'),
2747 viewedCount = BX(
'tr_viewed_count'),
2748 viewedPeriod = BX(
'tr_viewed_period'),
2750 if (BX.type.isElementNode(enableViewed))
2752 rowType = (enableViewed.checked ?
'table-row' :
'none');
2753 if (BX.type.isElementNode(viewedTime))
2755 BX.style(viewedTime,
'display', rowType);
2757 if (BX.type.isElementNode(viewedCount))
2759 BX.style(viewedCount,
'display', rowType);
2761 if (BX.type.isElementNode(viewedPeriod))
2763 BX.style(viewedPeriod,
'display', rowType);
2766 viewedPeriod =
null;
2769 enableViewed =
null;
2773 var discountReindex = BX(
'discount_reindex'),
2774 setsReindex = BX(
'sets_reindex'),
2775 catalogReindex = BX(
'catalog_reindex'),
2776 productSettings = BX(
'product_settings'),
2777 enableViewed = BX(
'enable_viewed_products_y');
2779 if (!!discountReindex)
2780 BX.bind(discountReindex,
'click', showDiscountReindex);
2782 BX.bind(setsReindex,
'click', showSetsAvailableReindex);
2783 if (!!catalogReindex)
2784 BX.bind(catalogReindex,
'click', showCatalogReindex);
2785 if (!!productSettings)
2786 BX.bind(productSettings,
'click', showProductSettings);
2787 if (BX.type.isElementNode(enableViewed))
2789 BX.bind(enableViewed,
'click', showViewed);
CatalogGetVATArray($arFilter=array(), $bInsertEmptyLine=false)
const BX_CATALOG_FILENAME_REG
for($i=0, $intCount=count($arAllOptions); $i< $intCount; $i++) $default_outfile_action
while($arIBlockType=$rsIBlockTypes->Fetch()) $arDoubleIBlockFullInfo
if($saleIsInstalled) $crmInstalled
while($arIBlock=$rsIBlocks->Fetch()) $catalogIterator
if($strVal !='') $sectionFields
if($saleIsInstalled &&Loader::includeModule('sale')) if(! $crmInstalled) if(! $useSaleDiscountOnly $enableViewedProducts)
if($strVal !='') $priceFields
const CATALOG_NEW_OFFERS_IBLOCK_NEED
if($canUseYandexMarket) $strWarning
if($canUseYandexMarket) if(! $useSaleDiscountOnly||$catalogCount > 0) if($strUseStoreControl==='N' && $catalogCount > 0 $systemTabControl)
if($_SERVER $arAllOptions['REQUEST_METHOD']=='GET' &&!empty($_REQUEST['RestoreDefaults']) &&! $bReadOnly &&check_bitrix_sessid())
if($strVal !='') $productFields
$strSaveProductWithoutPrice
static unRegisterEvents()
static isCanUseYandexExport()
static isCommonProductProcessingEnabled()
static normalizeArrayValuesByInt(&$map, $sorted=true)
static getProductReserveClearPeriod()
static getReservationConditionList($extendedMode=false)
static getProductReservationCondition()
static ShowScript($arConfig)
static ShowMessage($message)
static ShowNote($message)
static GetApplyModeList($extendedMode=false)
static DeleteByGroup($ID)
static GetList($by='c_sort', $order='asc', $arFilter=[], $SHOW_USERS_AMOUNT="N")
static GetNameFormat($dummy=null, $site_id="")
static FormatName($NAME_TEMPLATE, $arUser, $bUseLogin=false, $bHTMLSpec=true, $enabledEmptyNameStub=true)
static IsFeatureEnabled($_1488512778)
static getSettingsFields($type, $extFormat=false)
static GetList($arOrder=array(), $arFilter=array(), $arGroupBy=false, $arNavStartParams=false, $arSelectFields=array())
static GetList($arOrder=array(), $arFilter=array(), $arGroupBy=false, $arNavStartParams=false, $arSelectFields=array())
static GetList($arOrder=array("SORT"=> "ASC"), $arFilter=array())
static GetByIDLang($ID, $LID, $bFindAny=true)
bx popup label bx width30 PAGE_NEW_MENU_NAME text width
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Form FILTER_ACTION disabled
if(! $catalogEdit->isSuccess()) $iblock
$_SERVER["DOCUMENT_ROOT"]
URL bitrix admin public_file_edit php bxpublic
bitrix_sessid_post($varname='sessid', $returnInvocations=false)
check_bitrix_sessid($varname='sessid')
RegisterModuleDependences($FROM_MODULE_ID, $MESSAGE_ID, $TO_MODULE_ID, $TO_CLASS="", $TO_METHOD="", $SORT=100, $TO_PATH="", $TO_METHOD_ARG=[])
UnRegisterModuleDependences($FROM_MODULE_ID, $MESSAGE_ID, $TO_MODULE_ID, $TO_CLASS="", $TO_METHOD="", $TO_PATH="", $TO_METHOD_ARG=[])
htmlspecialcharsbx($string, $flags=ENT_COMPAT, $doubleEncode=true)
Rel2Abs($curdir, $relpath)
SelectBoxFromArray( $strBoxName, $db_array, $strSelectedVal="", $strDetText="", $field1="class='typeselect'", $go=false, $form="form1")
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
<? endif;?> window document title
if(empty($signedUserToken)) $key
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_CATALOG_EXPORT_EDIT)) if((!isset($_REQUEST['IBLOCK_ID']))||($_REQUEST['IBLOCK_ID']=='')) $intIBlockID