if(typeof so.messages['stage_'+stageCode] == 'undefined'){ this.setStatusText('Unknown status', true); sv.stage = false; return; } this.setStatusText(this.opts.messages['stage_'+stageCode], false); sv.stage = stageCode; } }); <?if(!CSaleLocation::isLocationProMigrated()):?> new BX.locationMigration(<?php echo CUtil::PhpToJSObject(array('url' => Helper::getMigrationUrl(), 'scope' => 'location-migration', 'ajaxFlag' => 'AJAX_MODE', 'redirectTo' => LocationHelper::getListUrl(0), 'messages' => array('error_occured' => Loc::getMessage('SALE_LOCATION_MIGRATION_ERROR'), 'stage_CREATE_TYPES' => Loc::getMessage('SALE_LOCATION_MIGRATION_STAGE_CREATE_TYPES'), 'stage_CONVERT_TREE' => Loc::getMessage('SALE_LOCATION_MIGRATION_STAGE_CONVERT_TREE'), 'stage_CONVERT_ZONES' => Loc::getMessage('SALE_LOCATION_MIGRATION_STAGE_CONVERT_ZONES'), 'stage_CONVERT_LINKS' => Loc::getMessage('SALE_LOCATION_MIGRATION_STAGE_CONVERT_LINKS'), 'stage_COPY_DEFAULT_LOCATIONS' => Loc::getMessage('SALE_LOCATION_MIGRATION_STAGE_COPY_DEFAULT_LOCATIONS'), 'stage_COPY_ZIP_CODES' => Loc::getMessage('SALE_LOCATION_MIGRATION_STAGE_COPY_ZIP_CODES'), 'stage_COMPLETE' => Loc::getMessage('SALE_LOCATION_MIGRATION_STAGE_COMPLETE'))), false, false, true); ?> ); <?endif?> </script> <style> .adm-loc-m-statusbar { margin-top: 10px; margin-bottom: -15px; } .bx-ui-loc-m-progressbar{ display: none; }
} ?> > </td> </tr> <tr> <td width="40%"><?php echo GetMessage("F_DEFAULT_VALUE"); ?> :</td> <td width="60%"> <?php if ($str_TYPE == 'LOCATION' && CSaleLocation::isLocationProMigrated()) { ?> <?php $GLOBALS["APPLICATION"]->IncludeComponent("bitrix:sale.location.selector." . \Bitrix\Sale\Location\Admin\Helper::getWidgetAppearance(), "", array("ID" => $str_DEFAULT_VALUE, "CODE" => '', "INPUT_NAME" => "DEFAULT_VALUE", "CACHE_TYPE" => "A", "CACHE_TIME" => "36000000", "PROVIDE_LINK_BY" => "id", "SEARCH_BY_PRIMARY" => "N", "SHOW_DEFAULT_LOCATIONS" => "N"), null, array('HIDE_ICONS' => 'Y')); ?> <?php } else { ?> <input type="text" name="DEFAULT_VALUE" value="<?php echo $str_DEFAULT_VALUE; ?> "> <?php } ?> </td> </tr> <tr> <td width="40%"><?php
protected static function getEditHtmlSingle($name, array $input, $value, $selector) { $filterMode = isset($input['IS_FILTER_FIELD']) && $input['IS_FILTER_FIELD'] === true; $parameters = array('CODE' => $value, 'INPUT_NAME' => $name, 'PROVIDE_LINK_BY' => 'code', 'SELECT_WHEN_SINGLE' => 'N', 'FILTER_BY_SITE' => 'N', 'SHOW_DEFAULT_LOCATIONS' => 'N', 'SEARCH_BY_PRIMARY' => 'N', 'JS_CONTROL_GLOBAL_ID' => $selector, 'JS_CALLBACK' => $input['JS_CALLBACK']); ob_start(); if ($filterMode) { print '<div style="width: 100%; margin-left: 12px">'; $parameters['INITIALIZE_BY_GLOBAL_EVENT'] = 'onAdminFilterInited'; // this allows js logic to be initialized after admin filter $parameters['GLOBAL_EVENT_SCOPE'] = 'window'; } $GLOBALS['APPLICATION']->IncludeComponent('bitrix:sale.location.selector.' . ($filterMode ? 'search' : \Bitrix\Sale\Location\Admin\Helper::getWidgetAppearance()), '', $parameters, false); if ($filterMode) { print '</div>'; } $html = ob_get_contents(); ob_end_clean(); return $html; }
</div> </div> <?php } ?> </div> </div> <?php } else { ?> <div class="adm-loc-error"> <?php echo Loc::getMessage('SALE_SLSS_NO_LOCATIONS', array('#ANCHOR_IMPORT#' => '<a href="' . Location\Admin\Helper::getImportUrl() . '" target="_blank">', '#ANCHOR_END#' => '</a>')); ?> </div> <?php } ?> <script type="text/html" data-template-id="bx-ui-item-tree-slss-node"> <div class="adm-loc-i-tree-node bx-ui-item-tree-slss-node" data-node-id="{{id}}" data-is-parent="{{is_parent}}"> <div class="adm-loc-i-selector-arrow {{expander_class}}"></div> <div class="adm-loc-i-tree-label {{select_class}}" data-node-id="{{id}}"> {{name}} </div> <div class="adm-loc-i-tree-panel bx-ui-item-tree-slss-children"> <div class="bx-ui-item-tree-slss-item-pool">
?> ]" value="<?php echo htmlspecialcharsbx($location_zip); ?> " size="5" /></td> </tr> <tr> <td class="adm-detail-content-cell-l"><?php echo GetMessage("SMO_LOCATION_SHOP_CITY") . ":"; ?> </td> <td class="adm-detail-content-cell-r"> <?if($lpEnabled):?> <?$APPLICATION->IncludeComponent("bitrix:sale.location.selector.".\Bitrix\Sale\Location\Admin\Helper::getWidgetAppearance(), "", array( "ID" => $location, "CODE" => "", "INPUT_NAME" => "location[".$siteList[$i]["ID"]."]", "PROVIDE_LINK_BY" => "id", "SHOW_ADMIN_CONTROLS" => 'N', "SELECT_WHEN_SINGLE" => 'N', "FILTER_BY_SITE" => 'N', "SHOW_DEFAULT_LOCATIONS" => 'N', "SEARCH_BY_PRIMARY" => 'Y' ), false );?> <?else:?>
<? use Bitrix\Main; use Bitrix\Main\Localization\Loc; use Bitrix\Sale\Location\Admin\Helper; define("NO_AGENT_CHECK", true); define("NO_KEEP_STATISTIC", true); $initialTime = time(); require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php"); require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/sale/prolog.php"); Loc::loadMessages(__FILE__); $APPLICATION->SetTitle(Loc::getMessage('SALE_LOCATION_IMPORT_TITLE')); require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_after.php"); $APPLICATION->IncludeComponent( 'bitrix:sale.location.import', 'admin', array( 'PATH_TO_IMPORT' => Helper::getImportUrl(), 'INITIAL_TIME' => $initialTime ), false ); ?> <?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/epilog_admin.php");?>
public static function proxyListRequest($page) { $parameters = parent::proxyListRequest($page); $fldSubMap = static::readMap(self::getEntityRoadCode(), 'list'); $roadMap = static::getEntityRoadMap(); $road = $roadMap[self::getEntityRoadCode()]['name']; $class = $road.'Table'; $languages = self::getLanguageList(); // select foreach($languages as $lang) { $lang = ToUpper($lang); $parameters['runtime']['NAME__'.$lang] = array( 'data_type' => $road, 'reference' => array( '=this.ID' => 'ref.'.$class::getReferenceFieldName(), '=ref.'. $class::getLanguageFieldName() => array('?', ToLower($lang)) // oracle is case-sensitive ), 'join_type' => 'left' ); if(!isset($parameters['select'])) $parameters['select'] = array(); foreach($fldSubMap as $code => $fld) $parameters['select'][$code.'_'.$lang] = 'NAME__'.$lang.'.'.$code; } // filter if(self::checkUseFilter()) { foreach($languages as $lang) { $lang = ToUpper($lang); foreach($fldSubMap as $code => $fld) { $key = 'find_'.$code.'_'.$lang; if(strlen($GLOBALS[$key])) $parameters['filter'][static::getFilterModifier($fld['data_type']).'NAME__'.$lang.'.'.$code] = $GLOBALS[$key]; } } } return $parameters; }
public static function performGridOperations($parameters) { $result = array('sucess' => true, 'errors' => array()); @set_time_limit(0); if (is_array($parameters['ID']) && !empty($parameters['ID'])) { $parameters['ID'] = array_unique($parameters['ID']); foreach ($parameters['ID'] as $id) { $res = static::delete($id); if (!$res['success']) { $result['success'] = false; $result['errors'] = array_merge($result['errors'], $res['errors']); } } } else { if (is_array($parameters['FILTER'])) { $entityClass = static::getEntityClass(); $parameters = Helper::getParametersForList($parameters); // from generalized to orm $resItems = $entityClass::getList(array('filter' => $parameters['filter'], 'select' => array('ID'))); while ($item = $resItems->fetch()) { $res = static::delete($item['ID']); if (!$res['success']) { $result['success'] = false; $result['errors'] = array_merge($result['errors'], $res['errors']); } } } } return $result; }
$arMenu["items"][] = array("text" => GetMessage("SALE_PERSON_TYPE"), "title" => GetMessage("SALE_PERSON_TYPE_DESCR"), "url" => "sale_person_type.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_person_type_edit.php")); $arMenu["items"][] = array("text" => GetMessage("SALE_STATUS"), "title" => GetMessage("SALE_STATUS_DESCR"), "url" => "sale_status.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_status_edit.php")); if (Bitrix\Main\Config\Option::get("main", "~sale_converted_15", 'N') == 'Y') { $arMenu["items"][] = array("text" => GetMessage("SALE_BUSINESS_VALUE"), "title" => 'SALE_BUSINESS_VALUE title', "url" => "sale_business_value.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_business_value.php")); } $arMenu["items"][] = array("text" => GetMessage("SALE_ORDER_PROPS"), "title" => GetMessage("SALE_ORDER_PROPS_DESCR"), "items_id" => "menu_sale_properties", "items" => array(array("text" => GetMessage("sale_menu_properties"), "title" => GetMessage("sale_menu_properties_title"), "url" => "sale_order_props.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_order_props_edit.php")), array("text" => GetMessage("SALE_ORDER_PROPS_GR"), "title" => GetMessage("SALE_ORDER_PROPS_GR_DESCR"), "url" => "sale_order_props_group.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_order_props_group_edit.php")))); /* LOCATIONS BEGIN */ // this file can be loaded directly, without module include, so ... require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/include.php"; if (class_exists('CSaleLocation')) { $locationMenu = array("text" => GetMessage("SALE_LOCATION"), "title" => GetMessage("SALE_LOCATION_DESCR"), "items_id" => "menu_sale_locations"); if (CSaleLocation::isLocationProEnabled()) { $locationMenu["items"] = array(array("text" => GetMessage("sale_menu_locations"), "title" => GetMessage("sale_menu_locations_title"), "url" => Location\Admin\LocationHelper::getListUrl(0), "more_url" => array(Location\Admin\LocationHelper::getEditUrl()), "module_id" => "sale", "items_id" => Location\Admin\LocationHelper::packItemsQueryString(), "dynamic" => true, "items" => Location\Admin\LocationHelper::getLocationSubMenu()), array("text" => GetMessage("SALE_LOCATION_GROUPS"), "title" => GetMessage("SALE_LOCATION_GROUPS_DESCR"), "url" => Location\Admin\GroupHelper::getListUrl(), "more_url" => array(Location\Admin\GroupHelper::getEditUrl())), array("text" => GetMessage("SALE_MENU_LOCATION_ZONES"), "title" => GetMessage("SALE_MENU_LOCATION_ZONES_TITLE"), "url" => Location\Admin\SiteLocationHelper::getListUrl(), "more_url" => array(Location\Admin\SiteLocationHelper::getEditUrl())), array("text" => GetMessage("SALE_MENU_LOCATION_DEFAULT"), "title" => GetMessage("SALE_MENU_LOCATION_DEFAULT_TITLE"), "url" => Location\Admin\DefaultSiteHelper::getListUrl(), "more_url" => array(Location\Admin\DefaultSiteHelper::getEditUrl())), array("text" => GetMessage("SALE_MENU_LOCATION_TYPES"), "title" => GetMessage("SALE_MENU_LOCATION_TYPES_TITLE"), "url" => Location\Admin\TypeHelper::getListUrl(), "more_url" => array(Location\Admin\TypeHelper::getEditUrl())), array("text" => GetMessage("SALE_MENU_LOCATION_SERVICES"), "title" => GetMessage("SALE_MENU_LOCATION_SERVICES_TITLE"), "url" => Location\Admin\ExternalServiceHelper::getListUrl(), "more_url" => array(Location\Admin\ExternalServiceHelper::getEditUrl())), array("text" => GetMessage("SALE_LOCATION_IMPORT"), "title" => GetMessage("SALE_LOCATION_IMPORT_DESCR"), "url" => Location\Admin\Helper::getImportUrl()), array("text" => GetMessage("SALE_LOCATION_REINDEX"), "title" => GetMessage("SALE_LOCATION_REINDEX_DESCR"), "url" => Location\Admin\Helper::getReindexUrl())); } else { $locationMenu["items"] = array(array("text" => GetMessage("sale_menu_locations"), "title" => GetMessage("sale_menu_locations_title"), "url" => "sale_location_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_location_edit.php")), array("text" => GetMessage("SALE_LOCATION_GROUPS"), "title" => GetMessage("SALE_LOCATION_GROUPS_DESCR"), "url" => "sale_location_group_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_location_group_edit.php")), array("text" => GetMessage("SALE_LOCATION_IMPORT"), "title" => GetMessage("SALE_LOCATION_IMPORT_DESCR"), "url" => "sale_location_import.php?lang=" . LANGUAGE_ID)); $locationMenu["items"][] = array("text" => GetMessage("SALE_MENU_LOCATION_MIGRATION"), "title" => GetMessage("SALE_MENU_LOCATION_MIGRATION_TITLE"), "url" => Location\Admin\Helper::getMigrationUrl()); } $arMenu["items"][] = $locationMenu; unset($locationMenu); } /* LOCATIONS END */ $arMenu["items"][] = array("text" => GetMessage("MAIN_MENU_1C_INTEGRATION"), "title" => GetMessage("MAIN_MENU_1C_INTEGRATION_TITLE"), "url" => "1c_admin.php?lang=" . LANGUAGE_ID, "more_url" => array("1c_admin.php")); $arMenu["items"][] = array("text" => GetMessage("MAIN_MENU_REPORT_EDIT"), "title" => GetMessage("MAIN_MENU_REPORT_EDIT_TITLE"), "url" => "sale_report_edit.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_report_edit.php")); if ($APPLICATION->GetGroupRight("sale") == "W" && (LANGUAGE_ID == "ru" || LANGUAGE_ID == "ua")) { $arMenu["items"][] = array("text" => GetMessage("SALE_TRADING_PLATFORMS"), "title" => GetMessage("SALE_TRADING_PLATFORMS_DESCR"), "items_id" => "menu_sale_trading_platforms", "items" => array(array("text" => GetMessage("SALE_YANDEX_MARKET"), "title" => GetMessage("SALE_YANDEX_MARKET_DESCR"), "url" => "sale_ymarket.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_ymarket.php")), array("text" => "Ebay", "title" => "Ebay", "items_id" => "menu_sale_trading_platforms_ebay", "more_url" => array("sale_ebay_actions.php"), "items" => array(array("text" => GetMessage("SALE_MENU_EBAY_WIZARD"), "title" => GetMessage("SALE_MENU_EBAY_EXCHANGE_DESCR"), "url" => "sale_ebay_wizard.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_ebay_wizard.php")), array("text" => GetMessage("SALE_MENU_EBAY_SETT"), "title" => GetMessage("SALE_MENU_EBAY_SETT_DESCR"), "url" => "sale_ebay.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_ebay.php")), array("text" => GetMessage("SALE_MENU_EBAY_POLICY"), "title" => GetMessage("SALE_MENU_EBAY_POLICY_DESCR"), "url" => "sale_ebay_policy.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_ebay_policy.php")), array("text" => GetMessage("SALE_MENU_EBAY_EXCHANGE"), "title" => GetMessage("SALE_MENU_EBAY_EXCHANGE_DESCR"), "url" => "sale_ebay_exchange.php?lang=" . LANGUAGE_ID, "more_url" => array("sale_ebay_exchange.php")))))); } } $aMenu[] = $arMenu; } /* Settings End*/ if ($APPLICATION->GetGroupRight("sale") != "D") {
"text" => GetMessage("SALE_LOCATION_GROUPS"), "title" => GetMessage("SALE_LOCATION_GROUPS_DESCR"), "url" => "sale_location_group_admin.php?lang=".LANGUAGE_ID, "more_url" => array("sale_location_group_edit.php"), ), array( "text" => GetMessage("SALE_LOCATION_IMPORT"), "title" => GetMessage("SALE_LOCATION_IMPORT_DESCR"), "url" => "sale_location_import.php?lang=".LANGUAGE_ID, ), ); $locationMenu["items"][] = array( "text" => GetMessage("SALE_MENU_LOCATION_MIGRATION"), "title" => GetMessage("SALE_MENU_LOCATION_MIGRATION_TITLE"), "url" => Location\Admin\Helper::getMigrationUrl(), ); } $arMenu["items"][] = $locationMenu; unset($locationMenu); } /* LOCATIONS END */ $arMenu["items"][] = array( "text" => GetMessage("MAIN_MENU_1C_INTEGRATION"), "title" => GetMessage("MAIN_MENU_1C_INTEGRATION_TITLE"), "url" => "1c_admin.php?lang=".LANGUAGE_ID, "more_url" => array("1c_admin.php"), ); $arMenu["items"][] = array(
public static function getFormData($id) { $formData = parent::getFormData($id); //$formData = array_merge($formData, static::getDefaultLocationList($id)); return $formData; }
<?php use Bitrix\Main; use Bitrix\Main\Localization\Loc; use Bitrix\Sale\Location\Admin\Helper; define("NO_AGENT_CHECK", true); define("NO_KEEP_STATISTIC", true); $initialTime = time(); require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php"; require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/sale/prolog.php"; Loc::loadMessages(__FILE__); $APPLICATION->SetTitle(Loc::getMessage('SALE_LOCATION_REINDEX_TITLE')); require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php"; $APPLICATION->IncludeComponent('bitrix:sale.location.reindex', 'admin', array('PATH_TO_REINDEX' => Helper::getReindexUrl(), 'INITIAL_TIME' => $INITIAL_TIME), false); ?> <?php require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
protected static function showDBIndexNotification() { \CAdminMessage::ShowMessage(array('MESSAGE' => Loc::getMessage('SALE_LOCATION_ADMIN_SEARCH_HELPER_ENTITY_INVALID_DBINDEX', array('#ANCHOR_INDEX_RESTORE#' => '<a href="' . Helper::getImportUrl() . '" target="_blank">', "#ANCHOR_END#" => '</a>')), 'type' => 'ERROR', 'HTML' => true)); }
if (!\Bitrix\Sale\Location\DB\Helper::checkIndexNameExists($name, $params['TABLE'])) { $absent[] = 'create index ' . $name . ' on ' . $params['TABLE'] . ' (' . implode(', ', $params['COLUMNS']) . ')' . \Bitrix\Sale\Location\DB\Helper::getQuerySeparatorSql(); } } } } if (!empty($absent)) { ?> <span style="color: #ff0000"> <?php echo Loc::getMessage('SALE_LOCATION_IMPORT_NO_INDEXES_WARNING', array('#ANCHOR_SQL_CONSOLE#' => '<a href="/bitrix/admin/sql.php" target="_blank">', '#ANCHOR_END#' => '</a>')); ?> </span> <br /> <br /> <pre> <?php echo implode("\n", $absent); ?> </pre> <?php } else { $APPLICATION->IncludeComponent('bitrix:sale.location.import', 'admin', array('PATH_TO_IMPORT' => Helper::getImportUrl(), 'INITIAL_TIME' => $initialTime), false); } ?> <?php require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_admin.php";
?> " size="5" /></td> </tr> <tr> <td class="adm-detail-content-cell-l"><?php echo GetMessage("SMO_LOCATION_SHOP_CITY") . ":"; ?> </td> <td class="adm-detail-content-cell-r"> <?php if ($lpEnabled) { ?> <?php $APPLICATION->IncludeComponent("bitrix:sale.location.selector." . \Bitrix\Sale\Location\Admin\Helper::getWidgetAppearance(), "", array("ID" => "", "CODE" => $location, "INPUT_NAME" => "location[" . $siteList[$i]["ID"] . "]", "PROVIDE_LINK_BY" => "code", "SHOW_ADMIN_CONTROLS" => 'N', "SELECT_WHEN_SINGLE" => 'N', "FILTER_BY_SITE" => 'N', "SHOW_DEFAULT_LOCATIONS" => 'N', "SEARCH_BY_PRIMARY" => 'Y'), false); ?> <?php } else { ?> <select name="location[<?php echo $siteList[$i]["ID"]; ?> ]"> <option value=''></option> <?php $dbLocationList = CSaleLocation::GetList(array("COUNTRY_NAME_LANG" => "ASC", "REGION_NAME_LANG" => "ASC", "CITY_NAME_LANG" => "ASC"), array(), LANGUAGE_ID); ?> <?php
</div> </div> <?php } ?> </div> </div> <?php } else { ?> <div class="adm-loc-error"> <?php echo Loc::getMessage('SALE_SLSS_NO_LOCATIONS', array('#ANCHOR_IMPORT#' => '<a href="' . ((string) $arParams['PATH_TO_LOCATION_IMPORT'] != '' ? $arParams['PATH_TO_LOCATION_IMPORT'] : Location\Admin\Helper::getImportUrl()) . '" target="_blank">', '#ANCHOR_END#' => '</a>')); ?> </div> <?php } ?> <script type="text/html" data-template-id="bx-ui-item-tree-slss-node"> <div class="adm-loc-i-tree-node bx-ui-item-tree-slss-node" data-node-id="{{id}}" data-is-parent="{{is_parent}}"> <div class="adm-loc-i-selector-arrow {{expander_class}}"></div> <div class="adm-loc-i-tree-label {{select_class}}" data-node-id="{{id}}"> {{name}} </div> <div class="adm-loc-i-tree-panel bx-ui-item-tree-slss-children"> <div class="bx-ui-item-tree-slss-item-pool">
public static function proxySaleAjaxLocationsComponent($parameters = array(), $additionalParams = array(), $template = '', $hideIcons = true, $wrapNewComponentWith = false) { global $APPLICATION; if (self::isLocationProEnabled()) { if (!is_array($additionalParams)) { $additionalParams = array(); } $parametersProxed = array_merge(array("ID" => $parameters["LOCATION_VALUE"], "CODE" => '', "INPUT_NAME" => $parameters["CITY_INPUT_NAME"], "CACHE_TYPE" => "A", "CACHE_TIME" => "36000000", "PROVIDE_LINK_BY" => "id", "SEARCH_BY_PRIMARY" => "N", "SHOW_DEFAULT_LOCATIONS" => "N"), $additionalParams); if (strlen($parameters['SITE_ID']) || ADMIN_SECTION != 'Y') { $parametersProxed["FILTER_BY_SITE"] = "Y"; $parametersProxed["FILTER_SITE_ID"] = strlen($parameters['SITE_ID']) ? $parameters['SITE_ID'] : SITE_ID; } if (strlen($wrapNewComponentWith)) { print '<div class="' . $wrapNewComponentWith . '">'; } if (!strlen($template)) { $appearance = \Bitrix\Sale\Location\Admin\Helper::getWidgetAppearance(); } else { $appearance = 'steps'; if ($template == 'popup' || $template == 'search') { $appearance = 'search'; } } $GLOBALS["APPLICATION"]->IncludeComponent("bitrix:sale.location.selector." . $appearance, "", $parametersProxed, null, array('HIDE_ICONS' => $hideIcons ? 'Y' : 'N')); if ($wrapNewComponentWith) { print '</div>'; } } else { $GLOBALS["APPLICATION"]->IncludeComponent('bitrix:sale.ajax.locations', $template, $parameters, null, array('HIDE_ICONS' => $hideIcons ? 'Y' : 'N')); } }