本文整理汇总了PHP中CIBlockParameters类的典型用法代码示例。如果您正苦于以下问题:PHP CIBlockParameters类的具体用法?PHP CIBlockParameters怎么用?PHP CIBlockParameters使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了CIBlockParameters类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderControlOptions
/**
* @param FieldType $fieldType
* @param string $callbackFunctionName
* @param mixed $value
* @return string
*/
public static function renderControlOptions(FieldType $fieldType, $callbackFunctionName, $value)
{
if (is_array($value)) {
reset($value);
$valueTmp = (int) current($value);
} else {
$valueTmp = (int) $value;
}
$iblockId = 0;
if ($valueTmp > 0) {
$elementIterator = \CIBlockElement::getList(array(), array('ID' => $valueTmp), false, false, array('ID', 'IBLOCK_ID'));
if ($element = $elementIterator->fetch()) {
$iblockId = $element['IBLOCK_ID'];
}
}
if ($iblockId <= 0 && (int) $fieldType->getOptions() > 0) {
$iblockId = (int) $fieldType->getOptions();
}
$defaultIBlockId = 0;
$result = '<select id="WFSFormOptionsX" onchange="' . htmlspecialcharsbx($callbackFunctionName) . '(this.options[this.selectedIndex].value)">';
$iblockTypeIterator = \CIBlockParameters::getIBlockTypes();
foreach ($iblockTypeIterator as $iblockTypeId => $iblockTypeName) {
$result .= '<optgroup label="' . htmlspecialcharsbx($iblockTypeName) . '">';
$iblockIterator = \CIBlock::getList(array('SORT' => 'ASC'), array('TYPE' => $iblockTypeId, 'ACTIVE' => 'Y'));
while ($iblock = $iblockIterator->fetch()) {
$result .= '<option value="' . $iblock['ID'] . '"' . ($iblock['ID'] == $iblockId ? ' selected' : '') . '>' . htmlspecialcharsbx($iblock['NAME']) . '</option>';
if ($defaultIBlockId <= 0 || $iblock['ID'] == $iblockId) {
$defaultIBlockId = $iblock['ID'];
}
}
$result .= '</optgroup>';
}
$result .= '</select><!--__defaultOptionsValue:' . $defaultIBlockId . '--><!--__modifyOptionsPromt:' . Loc::getMessage('UTP_ELIST_DOCUMENT_MOPROMT') . '-->';
$fieldType->setOptions($defaultIBlockId);
return $result;
}
示例2: array
$arPrice = array();
if ($boolCatalog) {
$arSort = array_merge($arSort, CCatalogIBlockParameters::GetCatalogSortFields());
$rsPrice = CCatalogGroup::GetList($v1 = "sort", $v2 = "asc");
while ($arr = $rsPrice->Fetch()) {
$arPrice[$arr["NAME"]] = "[" . $arr["NAME"] . "] " . $arr["NAME_LANG"];
}
} else {
$arPrice = $arProperty_N;
}
$arAscDesc = array("asc" => GetMessage("IBLOCK_SORT_ASC"), "desc" => GetMessage("IBLOCK_SORT_DESC"));
$arProperty_UF = array();
$arUserFields = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFields("IBLOCK_" . $arCurrentValues["IBLOCK_ID"] . "_SECTION");
foreach ($arUserFields as $FIELD_NAME => $arUserField) {
$arProperty_UF[$FIELD_NAME] = $arUserField["LIST_COLUMN_LABEL"] ? $arUserField["LIST_COLUMN_LABEL"] : $FIELD_NAME;
}
$arComponentParameters = array("GROUPS" => array("PRICES" => array("NAME" => GetMessage("IBLOCK_PRICES"))), "PARAMETERS" => array("IBLOCK_TYPE" => array("PARENT" => "BASE", "NAME" => GetMessage("IBLOCK_TYPE"), "TYPE" => "LIST", "VALUES" => $arIBlockType, "REFRESH" => "Y"), "IBLOCK_ID" => array("PARENT" => "BASE", "NAME" => GetMessage("IBLOCK_IBLOCK"), "TYPE" => "LIST", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arIBlock, "REFRESH" => "Y"), "SECTION_FIELDS" => CIBlockParameters::GetSectionFieldCode(GetMessage("CP_BCST_SECTION_FIELDS"), "DATA_SOURCE", array()), "SECTION_USER_FIELDS" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("CP_BCST_SECTION_USER_FIELDS"), "TYPE" => "LIST", "MULTIPLE" => "Y", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arProperty_UF), "SECTION_SORT_FIELD" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IBLOCK_SECTION_SORT_FIELD"), "TYPE" => "LIST", "VALUES" => CIBlockParameters::GetSectionSortFields(array('SORT', 'TIMESTAMP_X', 'NAME', 'ID', 'DEPTH_LEVEL'), array('KEY_LOWERCASE' => 'Y')), "ADDITIONAL_VALUES" => "Y", "DEFAULT" => "sort"), "SECTION_SORT_ORDER" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IBLOCK_SECTION_SORT_ORDER"), "TYPE" => "LIST", "VALUES" => $arAscDesc, "ADDITIONAL_VALUES" => "Y", "DEFAULT" => "asc"), "ELEMENT_SORT_FIELD" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IBLOCK_ELEMENT_SORT_FIELD"), "TYPE" => "LIST", "VALUES" => $arSort, "ADDITIONAL_VALUES" => "Y", "DEFAULT" => "sort"), "ELEMENT_SORT_ORDER" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IBLOCK_ELEMENT_SORT_ORDER"), "TYPE" => "LIST", "VALUES" => $arAscDesc, "DEFAULT" => "asc", "ADDITIONAL_VALUES" => "Y"), "ELEMENT_SORT_FIELD2" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IBLOCK_ELEMENT_SORT_FIELD2"), "TYPE" => "LIST", "VALUES" => $arSort, "ADDITIONAL_VALUES" => "Y", "DEFAULT" => "id"), "ELEMENT_SORT_ORDER2" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IBLOCK_ELEMENT_SORT_ORDER2"), "TYPE" => "LIST", "VALUES" => $arAscDesc, "DEFAULT" => "desc", "ADDITIONAL_VALUES" => "Y"), "FILTER_NAME" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IBLOCK_FILTER_NAME_IN"), "TYPE" => "STRING", "DEFAULT" => "arrFilter"), "SECTION_URL" => CIBlockParameters::GetPathTemplateParam("SECTION", "SECTION_URL", GetMessage("IBLOCK_SECTION_URL"), "", "URL_TEMPLATES"), "DETAIL_URL" => CIBlockParameters::GetPathTemplateParam("DETAIL", "DETAIL_URL", GetMessage("IBLOCK_DETAIL_URL"), "", "URL_TEMPLATES"), "BASKET_URL" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("IBLOCK_BASKET_URL"), "TYPE" => "STRING", "DEFAULT" => "/personal/basket.php"), "ACTION_VARIABLE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("IBLOCK_ACTION_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "action"), "PRODUCT_ID_VARIABLE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("IBLOCK_PRODUCT_ID_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "id"), "PRODUCT_QUANTITY_VARIABLE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("CP_BCST_PRODUCT_QUANTITY_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "quantity"), "PRODUCT_PROPS_VARIABLE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("CP_BCST_PRODUCT_PROPS_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "prop"), "SECTION_ID_VARIABLE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("IBLOCK_SECTION_ID_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "SECTION_ID"), "DISPLAY_COMPARE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_DISPLAY_COMPARE"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "USE_MAIN_ELEMENT_SECTION" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BCST_USE_MAIN_ELEMENT_SECTION"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "SECTION_COUNT" => array("PARENT" => "VISUAL", "NAME" => GetMessage("IBLOCK_SECTION_COUNT"), "TYPE" => "STRING", "DEFAULT" => "20"), "ELEMENT_COUNT" => array("PARENT" => "VISUAL", "NAME" => GetMessage("IBLOCK_ELEMENT_COUNT"), "TYPE" => "STRING", "DEFAULT" => "9"), "LINE_ELEMENT_COUNT" => array("PARENT" => "VISUAL", "NAME" => GetMessage("IBLOCK_LINE_ELEMENT_COUNT"), "TYPE" => "STRING", "DEFAULT" => "3"), "PROPERTY_CODE" => array("PARENT" => "VISUAL", "NAME" => GetMessage("IBLOCK_PROPERTY"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arProperty_LNS, "ADDITIONAL_VALUES" => "Y"), "PRICE_CODE" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_PRICE_CODE"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arPrice), "USE_PRICE_COUNT" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_USE_PRICE_COUNT"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "SHOW_PRICE_COUNT" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_SHOW_PRICE_COUNT"), "TYPE" => "STRING", "DEFAULT" => "1"), "PRICE_VAT_INCLUDE" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_VAT_INCLUDE"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "PRODUCT_PROPERTIES" => array("PARENT" => "PRICES", "NAME" => GetMessage("CP_BCST_PRODUCT_PROPERTIES"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arProperty_X), "USE_PRODUCT_QUANTITY" => array("PARENT" => "PRICES", "NAME" => GetMessage("CP_BCST_USE_PRODUCT_QUANTITY"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => 'Y'), "CACHE_TIME" => array("DEFAULT" => 36000000), "CACHE_FILTER" => array("PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("IBLOCK_CACHE_FILTER"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "CACHE_GROUPS" => array("PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("CP_BCST_CACHE_GROUPS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y")));
if ($boolCatalog) {
$arComponentParameters["PARAMETERS"]['HIDE_NOT_AVAILABLE'] = array('PARENT' => 'DATA_SOURCE', 'NAME' => GetMessage('CP_BCST_HIDE_NOT_AVAILABLE'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N');
if (CModule::IncludeModule('currency')) {
$arComponentParameters["PARAMETERS"]['CONVERT_CURRENCY'] = array('PARENT' => 'PRICES', 'NAME' => GetMessage('CP_BCST_CONVERT_CURRENCY'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N', 'REFRESH' => 'Y');
if (isset($arCurrentValues['CONVERT_CURRENCY']) && 'Y' == $arCurrentValues['CONVERT_CURRENCY']) {
$arCurrencyList = array();
$rsCurrencies = CCurrency::GetList($by = 'SORT', $order = 'ASC');
while ($arCurrency = $rsCurrencies->Fetch()) {
$arCurrencyList[$arCurrency['CURRENCY']] = $arCurrency['CURRENCY'];
}
$arComponentParameters['PARAMETERS']['CURRENCY_ID'] = array('PARENT' => 'PRICES', 'NAME' => GetMessage('CP_BCST_CURRENCY_ID'), 'TYPE' => 'LIST', 'VALUES' => $arCurrencyList, 'DEFAULT' => CCurrency::GetBaseCurrency(), "ADDITIONAL_VALUES" => "Y");
}
}
}
示例3: array
"VALUES" => $arSort,
"ADDITIONAL_VALUES" => "Y",
"DEFAULT" => "sort",
),
"ELEMENT_SORT_ORDER" => array(
"PARENT" => "DATA_SOURCE",
"NAME" => GetMessage("IBLOCK_ELEMENT_SORT_ORDER"),
"TYPE" => "LIST",
"VALUES" => $arAscDesc,
"DEFAULT" => "asc",
"ADDITIONAL_VALUES" => "Y",
),
"DETAIL_URL" => CIBlockParameters::GetPathTemplateParam(
"DETAIL",
"DETAIL_URL",
GetMessage("IBLOCK_DETAIL_URL"),
"",
"ADDITIONAL_SETTINGS"
),
"BASKET_URL" => array(
"PARENT" => "BASKET",
"NAME" => GetMessage("IBLOCK_BASKET_URL"),
"TYPE" => "STRING",
"DEFAULT" => "/personal/basket.php",
),
"ACTION_VARIABLE" => array(
"PARENT" => "ACTION_SETTINGS",
"NAME" => GetMessage("IBLOCK_ACTION_VARIABLE"),
"TYPE" => "STRING",
"DEFAULT" => "action",
),
示例4: array
<?
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();
if(!CModule::IncludeModule("iblock"))
return;
$arIBlockType = CIBlockParameters::GetIBlockTypes();
$arIBlock = array();
$rsIBlock = CIBlock::GetList(Array("sort" => "asc"), Array("TYPE" => $arCurrentValues["IBLOCK_TYPE"], "ACTIVE"=>"Y"));
while($arr=$rsIBlock->Fetch())
$arIBlock[$arr["ID"]] = "[".$arr["ID"]."] ".$arr["NAME"];
$arProperty_LNS = array();
$arProperty_N = array();
$arProperty_X = array();
if (0 < intval($arCurrentValues['IBLOCK_ID']))
{
$rsProp = CIBlockProperty::GetList(Array("sort"=>"asc", "name"=>"asc"), Array("IBLOCK_ID"=>$arCurrentValues["IBLOCK_ID"], "ACTIVE"=>"Y"));
while ($arr=$rsProp->Fetch())
{
if($arr["PROPERTY_TYPE"] != "F")
$arProperty[$arr["CODE"]] = "[".$arr["CODE"]."] ".$arr["NAME"];
if($arr["PROPERTY_TYPE"]=="N")
$arProperty_N[$arr["CODE"]] = "[".$arr["CODE"]."] ".$arr["NAME"];
if($arr["PROPERTY_TYPE"]!="F")
{
if($arr["MULTIPLE"] == "Y")
$arProperty_X[$arr["CODE"]] = "[".$arr["CODE"]."] ".$arr["NAME"];
示例5: array
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
$arYesNo = array("Y" => GetMessage("SPO_DESC_YES"), "N" => GetMessage("SPO_DESC_NO"));
$arComponentParameters = array("PARAMETERS" => array("SEF_MODE" => array("list" => array("NAME" => GetMessage("SPO_LIST_DESC"), "DEFAULT" => "index.php", "VARIABLES" => array()), "detail" => array("NAME" => GetMessage("SPO_DETAIL_DESC"), "DEFAULT" => "order_detail.php?ID=#ID#", "VARIABLES" => array("ID")), "cancel" => array("NAME" => GetMessage("SPO_CANCEL_DESC"), "DEFAULT" => "order_cancel.php?ID=#ID#", "VARIABLES" => array("ID"))), "ORDERS_PER_PAGE" => array("NAME" => GetMessage("SPO_ORDERS_PER_PAGE"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "20", "PARENT" => "ADDITIONAL_SETTINGS"), "PATH_TO_PAYMENT" => array("NAME" => GetMessage("SPO_PATH_TO_PAYMENT"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "payment.php", "PARENT" => "ADDITIONAL_SETTINGS"), "PATH_TO_BASKET" => array("NAME" => GetMessage("SPO_PATH_TO_BASKET"), "TYPE" => "STRING", "MULTIPLE" => "N", "DEFAULT" => "basket.php", "COLS" => 25, "PARENT" => "ADDITIONAL_SETTINGS"), "SET_TITLE" => array(), "SAVE_IN_SESSION" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SPO_SAVE_IN_SESSION"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "NAV_TEMPLATE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("SPOL_NAV_TEMPLATE"), "TYPE" => "STRING", "DEFAULT" => ""), "CACHE_TIME" => array("DEFAULT" => 3600), "CACHE_GROUPS" => array("PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("SPO_CACHE_GROUPS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y")));
if (CModule::IncludeModule("iblock")) {
$arComponentParameters["PARAMETERS"]["ACTIVE_DATE_FORMAT"] = CIBlockParameters::GetDateFormat(GetMessage("SPO_ACTIVE_DATE_FORMAT"), "VISUAL");
$arComponentParameters["PARAMETERS"]["CUSTOM_SELECT_PROPS"] = array("NAME" => GetMessage("SPO_PARAM_CUSTOM_SELECT_PROPS"), "TYPE" => "STRING", "MULTIPLE" => "Y", "VALUES" => array(), "PARENT" => "ADDITIONAL_SETTINGS");
}
if (CModule::IncludeModule("sale")) {
$dbPerson = CSalePersonType::GetList(array("SORT" => "ASC", "NAME" => "ASC"));
while ($arPerson = $dbPerson->GetNext()) {
$arPers2Prop = array("" => GetMessage("SPO_SHOW_ALL"));
$bProp = false;
$dbProp = CSaleOrderProps::GetList(array("SORT" => "ASC", "NAME" => "ASC"), array("PERSON_TYPE_ID" => $arPerson["ID"]));
while ($arProp = $dbProp->GetNext()) {
$arPers2Prop[$arProp["ID"]] = $arProp["NAME"];
$bProp = true;
}
if ($bProp) {
$arComponentParameters["PARAMETERS"]["PROP_" . $arPerson["ID"]] = array("NAME" => GetMessage("SPO_PROPS_NOT_SHOW") . " \"" . $arPerson["NAME"] . "\" (" . $arPerson["LID"] . ")", "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arPers2Prop, "DEFAULT" => "", "COLS" => 25, "ADDITIONAL_VALUES" => "N", "PARENT" => "BASE");
}
}
// "historic" statuses
$dbStat = CSaleStatus::GetList(array('sort' => 'asc'), array('LID' => LANGUAGE_ID), false, false, array('ID', 'NAME'));
$statList = array();
while ($item = $dbStat->Fetch()) {
$statList[$item['ID']] = $item['NAME'];
}
示例6: array
"DEFAULT" => "Y"
),
"SHOWN_ITEMS_COUNT" => array(
"PARENT" => "PHOTO_SETTINGS",
"NAME" => GetMessage("P_SHOWN_ITEMS_COUNT"),
"DEFAULT" => "6"
),
"SHOW_NAVIGATION" => array(
"PARENT" => "PHOTO_SETTINGS",
"NAME" => GetMessage("P_SHOW_NAVIGATION"),
"TYPE" => "CHECKBOX",
"DEFAULT" => "N",
"HIDDEN" => $hidden
),
"DATE_TIME_FORMAT_DETAIL" => CIBlockParameters::GetDateFormat(GetMessage("T_DATE_TIME_FORMAT_DETAIL"), "ADDITIONAL_SETTINGS"),
"DATE_TIME_FORMAT_SECTION" => CIBlockParameters::GetDateFormat(GetMessage("T_DATE_TIME_FORMAT_SECTION"), "ADDITIONAL_SETTINGS"),
/*
"USE_PHOTO_TITLE" => array(
"PARENT" => "PHOTO_SETTINGS",
"NAME" => GetMessage("P_USE_PHOTO_TITLE"),
"TYPE" => "CHECKBOX",
"DEFAULT" => "N"
),
"DISPLAY_PANEL" => Array(
"PARENT" => "ADDITIONAL_SETTINGS",
"NAME" => GetMessage("T_IBLOCK_DESC_NEWS_PANEL"),
"TYPE" => "CHECKBOX",
"DEFAULT" => "N",
"HIDDEN" => $hidden),
"USE_PERMISSIONS" => Array(
"PARENT" => "ADDITIONAL_SETTINGS",
示例7: array
$arIBlock_LINK = array();
$rsIblock = CIBlock::GetList(array("sort" => "asc"), array("TYPE" => $arCurrentValues["LINK_IBLOCK_TYPE"], "ACTIVE" => "Y"));
while ($arr = $rsIblock->Fetch()) {
$arIBlock_LINK[$arr["ID"]] = "[" . $arr["ID"] . "] " . $arr["NAME"];
}
$arProperty_LINK = array();
if (0 < intval($arCurrentValues["LINK_IBLOCK_ID"])) {
$rsProp = CIBlockProperty::GetList(array("sort" => "asc", "name" => "asc"), array("IBLOCK_ID" => $arCurrentValues["LINK_IBLOCK_ID"], "ACTIVE" => "Y"));
while ($arr = $rsProp->Fetch()) {
if (in_array($arr["PROPERTY_TYPE"], array("E"))) {
$arProperty_LINK[$arr["CODE"]] = "[" . $arr["CODE"] . "] " . $arr["NAME"];
}
}
}
$arAscDesc = array("asc" => GetMessage("IBLOCK_SORT_ASC"), "desc" => GetMessage("IBLOCK_SORT_DESC"));
$arComponentParameters = array("GROUPS" => array("PRICES" => array("NAME" => GetMessage("IBLOCK_PRICES")), "LINK" => array("NAME" => GetMessage("IBLOCK_LINK"))), "PARAMETERS" => array("IBLOCK_TYPE" => array("PARENT" => "BASE", "NAME" => GetMessage("IBLOCK_TYPE"), "TYPE" => "LIST", "VALUES" => $arIBlockType, "REFRESH" => "Y"), "IBLOCK_ID" => array("PARENT" => "BASE", "NAME" => GetMessage("IBLOCK_IBLOCK"), "TYPE" => "LIST", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arIBlock, "REFRESH" => "Y"), "ELEMENT_ID" => array("PARENT" => "BASE", "NAME" => GetMessage("IBLOCK_ELEMENT_ID"), "TYPE" => "STRING", "DEFAULT" => '={$_REQUEST["ELEMENT_ID"]}'), "ELEMENT_CODE" => array("PARENT" => "BASE", "NAME" => GetMessage("IBLOCK_ELEMENT_CODE"), "TYPE" => "STRING", "DEFAULT" => ''), "SECTION_ID" => array("PARENT" => "BASE", "NAME" => GetMessage("IBLOCK_SECTION_ID"), "TYPE" => "STRING", "DEFAULT" => '={$_REQUEST["SECTION_ID"]}'), "SECTION_CODE" => array("PARENT" => "BASE", "NAME" => GetMessage("IBLOCK_SECTION_CODE"), "TYPE" => "STRING", "DEFAULT" => ''), "SECTION_URL" => CIBlockParameters::GetPathTemplateParam("SECTION", "SECTION_URL", GetMessage("IBLOCK_SECTION_URL"), "", "URL_TEMPLATES"), "DETAIL_URL" => CIBlockParameters::GetPathTemplateParam("DETAIL", "DETAIL_URL", GetMessage("IBLOCK_DETAIL_URL"), "", "URL_TEMPLATES"), "BASKET_URL" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("IBLOCK_BASKET_URL"), "TYPE" => "STRING", "DEFAULT" => "/personal/basket.php"), "ACTION_VARIABLE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("IBLOCK_ACTION_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "action"), "PRODUCT_ID_VARIABLE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("IBLOCK_PRODUCT_ID_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "id"), "PRODUCT_QUANTITY_VARIABLE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("CP_BCE_PRODUCT_QUANTITY_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "quantity"), "PRODUCT_PROPS_VARIABLE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("CP_BCE_PRODUCT_PROPS_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "prop"), "SECTION_ID_VARIABLE" => array("PARENT" => "URL_TEMPLATES", "NAME" => GetMessage("IBLOCK_SECTION_ID_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "SECTION_ID"), "META_KEYWORDS" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_KEYWORDS"), "TYPE" => "LIST", "MULTIPLE" => "N", "DEFAULT" => "-", "VALUES" => array_merge(array("-" => " "), $arProperty_LS)), "META_DESCRIPTION" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("T_IBLOCK_DESC_DESCRIPTION"), "TYPE" => "LIST", "MULTIPLE" => "N", "DEFAULT" => "-", "VALUES" => array_merge(array("-" => " "), $arProperty_LS)), "BROWSER_TITLE" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BCE_BROWSER_TITLE"), "TYPE" => "LIST", "MULTIPLE" => "N", "DEFAULT" => "-", "VALUES" => array_merge(array("-" => " ", "NAME" => GetMessage("IBLOCK_FIELD_NAME")), $arProperty_LS)), "SET_TITLE" => array(), "SET_STATUS_404" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BCE_SET_STATUS_404"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "ADD_SECTIONS_CHAIN" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BCE_ADD_SECTIONS_CHAIN"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "PROPERTY_CODE" => array("PARENT" => "VISUAL", "NAME" => GetMessage("IBLOCK_PROPERTY"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arProperty, "ADDITIONAL_VALUES" => "Y"), "OFFERS_FIELD_CODE" => CIBlockParameters::GetFieldCode(GetMessage("CP_BCE_OFFERS_FIELD_CODE"), "VISUAL"), "OFFERS_PROPERTY_CODE" => array("PARENT" => "VISUAL", "NAME" => GetMessage("CP_BCE_OFFERS_PROPERTY_CODE"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arProperty_Offers, "ADDITIONAL_VALUES" => "Y"), "OFFERS_SORT_FIELD" => array("PARENT" => "VISUAL", "NAME" => GetMessage("CP_BCE_OFFERS_SORT_FIELD"), "TYPE" => "LIST", "VALUES" => array("shows" => GetMessage("IBLOCK_FIELD_SHOW_COUNTER"), "sort" => GetMessage("IBLOCK_FIELD_SORT"), "timestamp_x" => GetMessage("IBLOCK_FIELD_TIMESTAMP_X"), "name" => GetMessage("IBLOCK_FIELD_NAME"), "id" => GetMessage("IBLOCK_FIELD_ID"), "active_from" => GetMessage("IBLOCK_FIELD_ACTIVE_FROM"), "active_to" => GetMessage("IBLOCK_FIELD_ACTIVE_TO")), "ADDITIONAL_VALUES" => "Y", "DEFAULT" => "sort"), "OFFERS_SORT_ORDER" => array("PARENT" => "VISUAL", "NAME" => GetMessage("CP_BCE_OFFERS_SORT_ORDER"), "TYPE" => "LIST", "VALUES" => $arAscDesc, "DEFAULT" => "asc", "ADDITIONAL_VALUES" => "Y"), "OFFERS_LIMIT" => array("PARENT" => "VISUAL", "NAME" => GetMessage('CP_BCE_OFFERS_LIMIT'), "TYPE" => "STRING", "DEFAULT" => 0), "PRICE_CODE" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_PRICE_CODE"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arPrice), "USE_PRICE_COUNT" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_USE_PRICE_COUNT"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "SHOW_PRICE_COUNT" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_SHOW_PRICE_COUNT"), "TYPE" => "STRING", "DEFAULT" => "1"), "PRICE_VAT_INCLUDE" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_VAT_INCLUDE"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "PRICE_VAT_SHOW_VALUE" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_VAT_SHOW_VALUE"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "PRODUCT_PROPERTIES" => array("PARENT" => "PRICES", "NAME" => GetMessage("CP_BCE_PRODUCT_PROPERTIES"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arProperty_X), "USE_PRODUCT_QUANTITY" => array("PARENT" => "PRICES", "NAME" => GetMessage("CP_BCE_USE_PRODUCT_QUANTITY"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "LINK_IBLOCK_TYPE" => array("PARENT" => "LINK", "NAME" => GetMessage("IBLOCK_LINK_IBLOCK_TYPE"), "TYPE" => "LIST", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arIBlockType, "REFRESH" => "Y"), "LINK_IBLOCK_ID" => array("PARENT" => "LINK", "NAME" => GetMessage("IBLOCK_LINK_IBLOCK_ID"), "TYPE" => "LIST", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arIBlock_LINK, "REFRESH" => "Y"), "LINK_PROPERTY_SID" => array("PARENT" => "LINK", "NAME" => GetMessage("IBLOCK_LINK_PROPERTY_SID"), "TYPE" => "LIST", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arProperty_LINK), "LINK_ELEMENTS_URL" => array("PARENT" => "LINK", "NAME" => GetMessage("IBLOCK_LINK_ELEMENTS_URL"), "TYPE" => "STRING", "DEFAULT" => "link.php?PARENT_ELEMENT_ID=#ELEMENT_ID#"), "CACHE_TIME" => array("DEFAULT" => 36000000), "CACHE_GROUPS" => array("PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("CP_BCE_CACHE_GROUPS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "USE_ELEMENT_COUNTER" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage('CP_BCE_USE_ELEMENT_COUNTER'), "TYPE" => "CHECKBOX", "DEFAULT" => "Y")));
if (CModule::IncludeModule('catalog') && CModule::IncludeModule('currency')) {
$arComponentParameters["PARAMETERS"]['CONVERT_CURRENCY'] = array('PARENT' => 'PRICES', 'NAME' => GetMessage('CP_BCE_CONVERT_CURRENCY'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N', 'REFRESH' => 'Y');
if (isset($arCurrentValues['CONVERT_CURRENCY']) && 'Y' == $arCurrentValues['CONVERT_CURRENCY']) {
$arCurrencyList = array();
$rsCurrencies = CCurrency::GetList($by = 'SORT', $order = 'ASC');
while ($arCurrency = $rsCurrencies->Fetch()) {
$arCurrencyList[$arCurrency['CURRENCY']] = $arCurrency['CURRENCY'];
}
$arComponentParameters['PARAMETERS']['CURRENCY_ID'] = array('PARENT' => 'PRICES', 'NAME' => GetMessage('CP_BCE_CURRENCY_ID'), 'TYPE' => 'LIST', 'VALUES' => $arCurrencyList, 'DEFAULT' => CCurrency::GetBaseCurrency(), "ADDITIONAL_VALUES" => "Y");
}
}
if (!$OFFERS_IBLOCK_ID) {
unset($arComponentParameters["PARAMETERS"]["OFFERS_FIELD_CODE"]);
unset($arComponentParameters["PARAMETERS"]["OFFERS_PROPERTY_CODE"]);
unset($arComponentParameters["PARAMETERS"]["OFFERS_SORT_FIELD"]);
示例8: array
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
if (!CModule::IncludeModule("iblock")) {
return;
}
$arTypesEx = CIBlockParameters::GetIBlockTypes(array("-" => " "));
$arIBlocks = array();
$db_iblock = CIBlock::GetList(array("SORT" => "ASC"), array("SITE_ID" => $_REQUEST["site"], "TYPE" => $arCurrentValues["IBLOCK_TYPE"] != "-" ? $arCurrentValues["IBLOCK_TYPE"] : ""));
while ($arRes = $db_iblock->Fetch()) {
$arIBlocks[$arRes["ID"]] = $arRes["NAME"];
}
$arComponentParameters = array("GROUPS" => array(), "PARAMETERS" => array("IBLOCK_TYPE" => array("PARENT" => "BASE", "NAME" => "Тип инфоблока", "TYPE" => "LIST", "VALUES" => $arTypesEx, "DEFAULT" => "news", "REFRESH" => "Y"), "IBLOCK_ID" => array("PARENT" => "BASE", "NAME" => "IDИнфоблока", "TYPE" => "LIST", "VALUES" => $arIBlocks, "DEFAULT" => '={$_REQUEST["ID"]}', "ADDITIONAL_VALUES" => "Y", "REFRESH" => "Y"), "CACHE_TIME" => array("DEFAULT" => 36000000), "SLIDES" => array("PARENT" => "BASE", "NAME" => 'Количество слайдов', "TYPE" => "STRING", "DEFAULT" => "5")));
示例9: unset
$propertyCode = (string) $property['CODE'];
if ($propertyCode == '') {
$propertyCode = $property['ID'];
}
$propertyName = '[' . $propertyCode . '] ' . $property['NAME'];
if ($property['PROPERTY_TYPE'] != Iblock\PropertyTable::TYPE_FILE) {
$arProperty[$propertyCode] = $propertyName;
}
if ($property['PROPERTY_TYPE'] == Iblock\PropertyTable::TYPE_NUMBER) {
$arProperty_N[$propertyCode] = $propertyName;
}
}
unset($propertyCode, $propertyName, $property, $propertyIterator);
}
$arOffers = CIBlockPriceTools::GetOffersIBlock($arCurrentValues["IBLOCK_ID"]);
$OFFERS_IBLOCK_ID = is_array($arOffers) ? $arOffers["OFFERS_IBLOCK_ID"] : 0;
$arProperty_Offers = array();
if ($OFFERS_IBLOCK_ID) {
$rsProp = CIBlockProperty::GetList(array("sort" => "asc", "name" => "asc"), array("ACTIVE" => "Y", "IBLOCK_ID" => $OFFERS_IBLOCK_ID));
while ($arr = $rsProp->Fetch()) {
if ($arr["PROPERTY_TYPE"] != "F") {
$arProperty_Offers[$arr["CODE"]] = "[" . $arr["CODE"] . "] " . $arr["NAME"];
}
}
}
$arPrice = $catalogIncluded ? CCatalogIBlockParameters::getPriceTypesList() : $arProperty_N;
$arComponentParameters = array("GROUPS" => array("PRICES" => array("NAME" => GetMessage("IBLOCK_PRICES"))), "PARAMETERS" => array("IBLOCK_TYPE" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IBLOCK_TYPE"), "TYPE" => "LIST", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arIBlockType, "REFRESH" => "Y"), "IBLOCK_ID" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IBLOCK_IBLOCK"), "TYPE" => "LIST", "ADDITIONAL_VALUES" => "Y", "VALUES" => $arIBlock, "REFRESH" => "Y"), "FILTER_NAME" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IBLOCK_FILTER_NAME_OUT"), "TYPE" => "STRING", "DEFAULT" => "arrFilter"), "FIELD_CODE" => CIBlockParameters::GetFieldCode(GetMessage("IBLOCK_FIELD"), "DATA_SOURCE", array("SECTION_ID" => true)), "PROPERTY_CODE" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("IBLOCK_PROPERTY"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arProperty, "ADDITIONAL_VALUES" => "Y"), "OFFERS_FIELD_CODE" => CIBlockParameters::GetFieldCode(GetMessage("CP_BCF_OFFERS_FIELD_CODE"), "DATA_SOURCE"), "OFFERS_PROPERTY_CODE" => array("PARENT" => "DATA_SOURCE", "NAME" => GetMessage("CP_BCF_OFFERS_PROPERTY_CODE"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arProperty_Offers, "ADDITIONAL_VALUES" => "Y"), "PRICE_CODE" => array("PARENT" => "PRICES", "NAME" => GetMessage("IBLOCK_PRICE_CODE"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arPrice), "CACHE_TIME" => array("DEFAULT" => 36000000), "CACHE_GROUPS" => array("PARENT" => "CACHE_SETTINGS", "NAME" => GetMessage("CP_BCF_CACHE_GROUPS"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "LIST_HEIGHT" => array("PARENT" => "VISUAL", "NAME" => GetMessage("IBLOCK_LIST_HEIGHT"), "TYPE" => "STRING", "DEFAULT" => "5"), "TEXT_WIDTH" => array("PARENT" => "VISUAL", "NAME" => GetMessage("IBLOCK_TEXT_WIDTH"), "TYPE" => "STRING", "DEFAULT" => "20"), "NUMBER_WIDTH" => array("PARENT" => "VISUAL", "NAME" => GetMessage("IBLOCK_NUMBER_WIDTH"), "TYPE" => "STRING", "DEFAULT" => "5"), "SAVE_IN_SESSION" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("IBLOCK_SAVE_IN_SESSION"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "PAGER_PARAMS_NAME" => array("PARENT" => "ADDITIONAL_SETTINGS", "NAME" => GetMessage("CP_BCF_PAGER_PARAMS_NAME"), "TYPE" => "STRING", "DEFAULT" => "arrPager")));
if (!$OFFERS_IBLOCK_ID) {
unset($arComponentParameters["PARAMETERS"]["OFFERS_FIELD_CODE"]);
unset($arComponentParameters["PARAMETERS"]["OFFERS_PROPERTY_CODE"]);
}
示例10: array
}
// Prices
$catalogGroupIterator = CCatalogGroup::getList(array("NAME" => "ASC", "SORT" => "ASC"));
$catalogGroups = array();
while ($catalogGroup = $catalogGroupIterator->fetch()) {
$catalogGroups[$catalogGroup['NAME']] = "[{$catalogGroup['NAME']}] {$catalogGroup['NAME_LANG']}";
}
// iblockTypes
$iblockTypes = CIBlockParameters::getIBlockTypes();
$iblockNames = array();
$iblockIterator = CIBlock::GetList(array("SORT" => "ASC"), array("TYPE" => $arCurrentValues["IBLOCK_TYPE"] != "-" ? $arCurrentValues["IBLOCK_TYPE"] : ""));
while ($iblock = $iblockIterator->fetch()) {
$iblockNames[$iblock['ID']] = "[{$iblock['CODE']}] {$iblock['NAME']}";
}
$arAscDesc = array("asc" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_SORT_ASC"), "desc" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_SORT_DESC"));
$arComponentParameters = array("GROUPS" => array("PRICES" => array("NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_PRICES")), "BASKET" => array("NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_BASKET"))), "PARAMETERS" => array("IBLOCK_TYPE" => array("PARENT" => "BASE", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_TYPE"), "TYPE" => "LIST", "VALUES" => $iblockTypes, "DEFAULT" => "catalog", "REFRESH" => "Y"), "IBLOCK_ID" => array("PARENT" => "BASE", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_IBLOCK_ID"), "TYPE" => "LIST", "VALUES" => $iblockNames, "DEFAULT" => '={$_REQUEST["IBLOCK_ID"]}', "ADDITIONAL_VALUES" => "Y", "REFRESH" => "Y"), "ID" => array("PARENT" => "BASE", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_ID"), "TYPE" => "STRING", "DEFAULT" => '={$_REQUEST["PRODUCT_ID"]}'), "CODE" => array("PARENT" => "BASE", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_CODE"), "TYPE" => "STRING", "DEFAULT" => '={$_REQUEST["PRODUCT_CODE"]}'), "PROPERTY_LINK" => array("PARENT" => "BASE", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_PROP_LIST"), "TYPE" => "STRING", "DEFAULT" => "RECOMMEND"), "OFFERS_PROPERTY_LINK" => array("PARENT" => "BASE", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_OFFERS_PROP_LIST"), "TYPE" => "STRING", "DEFAULT" => "RECOMMEND"), "CACHE_TIME" => array("DEFAULT" => 86400), "DETAIL_URL" => CIBlockParameters::GetPathTemplateParam("DETAIL", "DETAIL_URL", GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_DETAIL_URL"), "", "URL_TEMPLATES"), "BASKET_URL" => array("PARENT" => "BASKET", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_BASKET_URL"), "TYPE" => "STRING", "DEFAULT" => "/personal/basket.php"), "ACTION_VARIABLE" => array("PARENT" => "BASKET", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_ACTION_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "action"), "PRODUCT_ID_VARIABLE" => array("PARENT" => "BASKET", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_PRODUCT_ID_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "id"), "PRODUCT_QUANTITY_VARIABLE" => array("PARENT" => "BASKET", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_PRODUCT_QUANTITY_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "quantity"), "ADD_PROPERTIES_TO_BASKET" => array("PARENT" => "BASKET", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_ADD_PROPERTIES_TO_BASKET"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "REFRESH" => "Y"), "PRODUCT_PROPS_VARIABLE" => array("PARENT" => "BASKET", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_PRODUCT_PROPS_VARIABLE"), "TYPE" => "STRING", "DEFAULT" => "prop", "HIDDEN" => isset($arCurrentValues['ADD_PROPERTIES_TO_BASKET']) && $arCurrentValues['ADD_PROPERTIES_TO_BASKET'] == 'N' ? 'Y' : 'N'), "PARTIAL_PRODUCT_PROPERTIES" => array("PARENT" => "BASKET", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_PARTIAL_PRODUCT_PROPERTIES"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "HIDDEN" => isset($arCurrentValues['ADD_PROPERTIES_TO_BASKET']) && $arCurrentValues['ADD_PROPERTIES_TO_BASKET'] == 'N' ? 'Y' : 'N'), "SHOW_OLD_PRICE" => array("PARENT" => "PRICES", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_SHOW_OLD_PRICE"), "TYPE" => "CHECKBOX", "VALUES" => "N"), 'SHOW_DISCOUNT_PERCENT' => array('PARENT' => 'VISUAL', 'NAME' => GetMessage('CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_SHOW_DISCOUNT_PERCENT'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N'), "PRICE_CODE" => array("PARENT" => "PRICES", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_PRICE_CODE"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $catalogGroups), "SHOW_PRICE_COUNT" => array("PARENT" => "PRICES", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_SHOW_PRICE_COUNT"), "TYPE" => "STRING", "DEFAULT" => "1"), 'PRODUCT_SUBSCRIPTION' => array('PARENT' => 'VISUAL', 'NAME' => GetMessage('CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_PRODUCT_SUBSCRIPTION'), 'TYPE' => 'CHECKBOX', 'DEFAULT' => 'N'), "PRICE_VAT_INCLUDE" => array("PARENT" => "PRICES", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_VAT_INCLUDE"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "USE_PRODUCT_QUANTITY" => array("PARENT" => "BASKET", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_USE_PRODUCT_QUANTITY"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y"), "SHOW_NAME" => array("PARENT" => "VISUAL", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_SHOW_NAME"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "SHOW_IMAGE" => array("PARENT" => "VISUAL", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_SHOW_IMAGE"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), 'MESS_BTN_BUY' => array('PARENT' => 'VISUAL', 'NAME' => GetMessage('CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_MESS_BTN_BUY'), 'TYPE' => 'STRING', 'DEFAULT' => GetMessage('CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_MESS_BTN_BUY_DEFAULT')), 'MESS_BTN_DETAIL' => array('PARENT' => 'VISUAL', 'NAME' => GetMessage('CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_MESS_BTN_DETAIL'), 'TYPE' => 'STRING', 'DEFAULT' => GetMessage('CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_MESS_BTN_DETAIL_DEFAULT')), 'MESS_NOT_AVAILABLE' => array('PARENT' => 'VISUAL', 'NAME' => GetMessage('CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_MESS_NOT_AVAILABLE'), 'TYPE' => 'STRING', 'DEFAULT' => GetMessage('CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_MESS_NOT_AVAILABLE_DEFAULT')), 'MESS_BTN_SUBSCRIBE' => array('PARENT' => 'VISUAL', 'NAME' => GetMessage('CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_MESS_BTN_SUBSCRIBE'), 'TYPE' => 'STRING', 'DEFAULT' => GetMessage('CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_MESS_BTN_SUBSCRIBE_DEFAULT')), "PAGE_ELEMENT_COUNT" => array("PARENT" => "VISUAL", "NAME" => GetMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_PAGE_ELEMENT_COUNT"), "TYPE" => "STRING", "DEFAULT" => "30")));
// Params groups
$iblockMap = array();
$iblockIterator = CIBlock::GetList(array("SORT" => "ASC"), array("ACTIVE" => "Y"));
while ($iblock = $iblockIterator->fetch()) {
$iblockMap[$iblock['ID']] = $iblock;
}
$catalogs = array();
$productsCatalogs = array();
$skuCatalogs = array();
$catalogIterator = CCatalog::getList(array("IBLOCK_ID" => "ASC"), array("@IBLOCK_ID" => array_keys($iblockMap)));
while ($catalog = $catalogIterator->fetch()) {
$isOffersCatalog = (int) $catalog['PRODUCT_IBLOCK_ID'] > 0;
if ($isOffersCatalog) {
$skuCatalogs[$catalog['PRODUCT_IBLOCK_ID']] = $catalog;
} else {
示例11: Array
),
"ADD_SECTIONS_CHAIN" => Array(
"PARENT" => "ADDITIONAL_SETTINGS",
"NAME" => GetMessage("CP_BCE_ADD_SECTIONS_CHAIN"),
"TYPE" => "CHECKBOX",
"DEFAULT" => "Y",
),
"PROPERTY_CODE" => array(
"PARENT" => "VISUAL",
"NAME" => GetMessage("IBLOCK_PROPERTY"),
"TYPE" => "LIST",
"MULTIPLE" => "Y",
"VALUES" => $arProperty,
"ADDITIONAL_VALUES" => "Y",
),
"OFFERS_FIELD_CODE" => CIBlockParameters::GetFieldCode(GetMessage("CP_BCE_OFFERS_FIELD_CODE"), "VISUAL"),
"OFFERS_PROPERTY_CODE" => array(
"PARENT" => "VISUAL",
"NAME" => GetMessage("CP_BCE_OFFERS_PROPERTY_CODE"),
"TYPE" => "LIST",
"MULTIPLE" => "Y",
"VALUES" => $arProperty_Offers,
"ADDITIONAL_VALUES" => "Y",
),
"OFFERS_SORT_FIELD" => array(
"PARENT" => "VISUAL",
"NAME" => GetMessage("CP_BCE_OFFERS_SORT_FIELD"),
"TYPE" => "LIST",
"VALUES" => array(
"shows" => GetMessage("IBLOCK_FIELD_SHOW_COUNTER"),
"sort" => GetMessage("IBLOCK_FIELD_SORT"),
示例12: GetMessage
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
if (!CModule::IncludeModule("iblock")) {
return;
}
$arIBlockType = CIBlockParameters::GetIBlockTypes(array("-" => GetMessage("CP_BCI1_CREATE")));
$arUGroupsEx = array();
$dbUGroups = CGroup::GetList($by = "c_sort", $order = "asc");
while ($arUGroups = $dbUGroups->Fetch()) {
$arUGroupsEx[$arUGroups["ID"]] = $arUGroups["NAME"];
}
$rsSite = CSite::GetList($by = "sort", $order = "asc", $arFilter = array("ACTIVE" => "Y"));
$arSites = array("-" => GetMessage("CP_BCI1_CURRENT"));
while ($arSite = $rsSite->GetNext()) {
$arSites[$arSite["LID"]] = $arSite["NAME"];
}
$arAction = array("N" => GetMessage("CP_BCI1_NONE"), "A" => GetMessage("CP_BCI1_DEACTIVATE"), "D" => GetMessage("CP_BCI1_DELETE"));
$arComponentParameters = array("GROUPS" => array("PICTURE" => array("NAME" => GetMessage("CP_BCI1_PICTURE")), "TRANSLIT" => array("NAME" => GetMessage("CP_BCI1_TRANSLIT"))), "PARAMETERS" => array("IBLOCK_TYPE" => array("PARENT" => "BASE", "NAME" => GetMessage("CP_BCI1_IBLOCK_TYPE"), "TYPE" => "LIST", "VALUES" => $arIBlockType), "SITE_LIST" => array("PARENT" => "BASE", "NAME" => GetMessage("CP_BCI1_SITE_LIST"), "TYPE" => "LIST", "MULTIPLE" => "Y", "VALUES" => $arSites), "INTERVAL" => array("PARENT" => "BASE", "NAME" => GetMessage("CP_BCI1_INTERVAL"), "TYPE" => "STRING", "DEFAULT" => 30), "GROUP_PERMISSIONS" => array("PARENT" => "BASE", "NAME" => GetMessage("CP_BCI1_GROUP_PERMISSIONS"), "TYPE" => "LIST", "VALUES" => $arUGroupsEx, "DEFAULT" => array(1), "MULTIPLE" => "Y"), "USE_OFFERS" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_USE_OFFERS"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "FORCE_OFFERS" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_FORCE_OFFERS"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "USE_IBLOCK_TYPE_ID" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_USE_IBLOCK_TYPE_ID"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "SKIP_ROOT_SECTION" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_SKIP_ROOT_SECTION"), "TYPE" => "CHECKBOX", "DEFAULT" => "N"), "ELEMENT_ACTION" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_ELEMENT_ACTION"), "TYPE" => "LIST", "VALUES" => $arAction, "DEFAULT" => "D"), "SECTION_ACTION" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_SECTION_ACTION"), "TYPE" => "LIST", "VALUES" => $arAction, "DEFAULT" => "D"), "FILE_SIZE_LIMIT" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_FILE_SIZE_LIMIT"), "TYPE" => "STRING", "DEFAULT" => 200 * 1024), "USE_CRC" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_USE_CRC"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "USE_ZIP" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_USE_ZIP"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y"), "SKIP_SOURCE_CHECK" => array("PARENT" => "ADDITIONAL", "NAME" => GetMessage("CP_BCI1_SKIP_SOURCE_CHECK"), "TYPE" => "CHECKBOX", "DEFAULT" => "N")));
$arComponentParameters["PARAMETERS"]["USE_IBLOCK_PICTURE_SETTINGS"] = array("PARENT" => "PICTURE", "NAME" => GetMessage("CP_BCI1_USE_IBLOCK_PICTURE_SETTINGS"), "TYPE" => "CHECKBOX", "DEFAULT" => "N", "REFRESH" => "Y");
if ($arCurrentValues["USE_IBLOCK_PICTURE_SETTINGS"] !== "Y") {
$arComponentParameters["PARAMETERS"]["GENERATE_PREVIEW"] = array("PARENT" => "PICTURE", "NAME" => GetMessage("CP_BCI1_GENERATE_PREVIEW"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "REFRESH" => "Y");
if ($arCurrentValues["GENERATE_PREVIEW"] != "N") {
$arComponentParameters["PARAMETERS"]["PREVIEW_WIDTH"] = array("PARENT" => "PICTURE", "NAME" => GetMessage("CP_BCI1_PREVIEW_WIDTH"), "TYPE" => "STRING", "DEFAULT" => 100);
$arComponentParameters["PARAMETERS"]["PREVIEW_HEIGHT"] = array("PARENT" => "PICTURE", "NAME" => GetMessage("CP_BCI1_PREVIEW_HEIGHT"), "TYPE" => "STRING", "DEFAULT" => 100);
}
$arComponentParameters["PARAMETERS"]["DETAIL_RESIZE"] = array("PARENT" => "PICTURE", "NAME" => GetMessage("CP_BCI1_DETAIL_RESIZE"), "TYPE" => "CHECKBOX", "DEFAULT" => "Y", "REFRESH" => "Y");
if ($arCurrentValues["DETAIL_RESIZE"] != "N") {
$arComponentParameters["PARAMETERS"]["DETAIL_WIDTH"] = array("PARENT" => "PICTURE", "NAME" => GetMessage("CP_BCI1_DETAIL_WIDTH"), "TYPE" => "STRING", "DEFAULT" => 300);
示例13: array
if (CIBlockRights::UserHasRightTo($ID, $ID, "iblock_edit")) {
$aMenu = array(array("TEXT" => GetMessage("IBLOCK_BACK_TO_ADMIN"), "LINK" => '/bitrix/admin/iblock_admin.php?lang=' . $lang . '&type=' . urlencode($type) . '&admin=' . ($_REQUEST["admin"] == "Y" ? "Y" : "N"), "ICON" => "btn_list"));
$context = new CAdminContextMenu($aMenu);
$context->Show();
$u = new CAdminPopupEx("mnu_LIST_PAGE_URL", CIBlockParameters::GetPathTemplateMenuItems("LIST", "__SetUrlVar", "mnu_LIST_PAGE_URL", "LIST_PAGE_URL"), array("zIndex" => 2000));
$u->Show();
$u = new CAdminPopupEx("mnu_SECTION_PAGE_URL", CIBlockParameters::GetPathTemplateMenuItems("SECTION", "__SetUrlVar", "mnu_SECTION_PAGE_URL", "SECTION_PAGE_URL"), array("zIndex" => 2000));
$u->Show();
$arItems = CIBlockParameters::GetPathTemplateMenuItems("DETAIL", "__SetUrlVar", "mnu_DETAIL_PAGE_URL", "DETAIL_PAGE_URL");
if ($str_CATALOG_TYPE == 'O') {
$arItems[] = array("SEPARATOR" => true);
$arItems[] = array("TEXT" => GetMessage("IB_E_URL_PRODUCT_ID"), "TITLE" => "#PRODUCT_URL# - " . GetMessage("IB_E_URL_PRODUCT_ID"), "ONCLICK" => "__SetUrlVar('#PRODUCT_URL#', 'mnu_DETAIL_PAGE_URL', 'DETAIL_PAGE_URL')");
}
$u = new CAdminPopupEx("mnu_DETAIL_PAGE_URL", $arItems, array("zIndex" => 2000));
$u->Show();
$arItems = CIBlockParameters::GetPathTemplateMenuItems("DETAIL", "__SetUrlVar", "mnu_CANONICAL_PAGE_URL", "CANONICAL_PAGE_URL");
array_unshift($arItems, array("SEPARATOR" => true));
array_unshift($arItems, array("TEXT" => "https://", "TITLE" => "", "ONCLICK" => "__SetUrlVar('https://', 'mnu_CANONICAL_PAGE_URL', 'CANONICAL_PAGE_URL')"));
array_unshift($arItems, array("TEXT" => "http://", "TITLE" => "", "ONCLICK" => "__SetUrlVar('http://', 'mnu_CANONICAL_PAGE_URL', 'CANONICAL_PAGE_URL')"));
$u = new CAdminPopupEx("mnu_CANONICAL_PAGE_URL", $arItems, array("zIndex" => 2000));
$u->Show();
?>
<script>
var InheritedPropertiesTemplates = new JCInheritedPropertiesTemplates(
'frm',
'/bitrix/admin/iblock_templates.ajax.php?ENTITY_TYPE=B&ENTITY_ID=<?php
echo intval($ID);
?>
'
);
BX.ready(function(){
示例14: GetFieldInputControlOptions
function GetFieldInputControlOptions($documentType, &$arFieldType, $jsFunctionName, &$value)
{
$result = "";
static $arDocumentFieldTypes = array();
if (!array_key_exists($documentType, $arDocumentFieldTypes)) {
$arDocumentFieldTypes[$documentType] = self::GetDocumentFieldTypes($documentType);
}
if (!array_key_exists($arFieldType["Type"], $arDocumentFieldTypes[$documentType]) || !$arDocumentFieldTypes[$documentType][$arFieldType["Type"]]["Complex"]) {
return "";
}
if ($arFieldType["Type"] == "E:EList") {
if (is_array($value)) {
reset($value);
$valueTmp = intval(current($value));
} else {
$valueTmp = intval($value);
}
$iblockId = 0;
if ($valueTmp > 0) {
$dbResult = CIBlockElement::GetList(array(), array("ID" => $valueTmp), false, false, array("ID", "IBLOCK_ID"));
if ($arResult = $dbResult->Fetch()) {
$iblockId = $arResult["IBLOCK_ID"];
}
}
if ($iblockId <= 0 && intval($arFieldType["Options"]) > 0) {
$iblockId = intval($arFieldType["Options"]);
}
$defaultIBlockId = 0;
$result .= '<select id="WFSFormOptionsX" onchange="' . htmlspecialcharsbx($jsFunctionName) . '(this.options[this.selectedIndex].value)">';
$arIBlockType = CIBlockParameters::GetIBlockTypes();
foreach ($arIBlockType as $iblockTypeId => $iblockTypeName) {
$result .= '<optgroup label="' . $iblockTypeName . '">';
$dbIBlock = CIBlock::GetList(array("SORT" => "ASC"), array("TYPE" => $iblockTypeId, "ACTIVE" => "Y"));
while ($arIBlock = $dbIBlock->GetNext()) {
$result .= '<option value="' . $arIBlock["ID"] . '"' . ($arIBlock["ID"] == $iblockId ? " selected" : "") . '>' . $arIBlock["NAME"] . '</option>';
if ($defaultIBlockId <= 0 || $arIBlock["ID"] == $iblockId) {
$defaultIBlockId = $arIBlock["ID"];
}
}
$result .= '</optgroup>';
}
$result .= '</select><!--__defaultOptionsValue:' . $defaultIBlockId . '--><!--__modifyOptionsPromt:' . GetMessage("IBD_DOCUMENT_MOPROMT") . '-->';
$arFieldType["Options"] = $defaultIBlockId;
} elseif ($arFieldType["Type"] == "select") {
$valueTmp = $arFieldType["Options"];
if (!is_array($valueTmp)) {
$valueTmp = array($valueTmp => $valueTmp);
}
$str = '';
foreach ($valueTmp as $k => $v) {
if (is_array($v) && count($v) == 2) {
$v1 = array_values($v);
$k = $v1[0];
$v = $v1[1];
}
if ($k != $v) {
$str .= '[' . $k . ']' . $v;
} else {
$str .= $v;
}
$str .= "\n";
}
$result .= '<textarea id="WFSFormOptionsX" rows="5" cols="30">' . htmlspecialcharsbx($str) . '</textarea><br />';
$result .= GetMessage("IBD_DOCUMENT_XFORMOPTIONS1") . '<br />';
$result .= GetMessage("IBD_DOCUMENT_XFORMOPTIONS2") . '<br />';
$result .= '<script type="text/javascript">
function WFSFormOptionsXFunction()
{
var result = {};
var i, id, val, str = document.getElementById("WFSFormOptionsX").value;
var arr = str.split(/[\\r\\n]+/);
var p, re = /\\[([^\\]]+)\\].+/;
for (i in arr)
{
str = arr[i].replace(/^\\s+|\\s+$/g, \'\');
if (str.length > 0)
{
id = str.match(re);
if (id)
{
p = str.indexOf(\']\');
id = id[1];
val = str.substr(p + 1);
}
else
{
val = str;
id = val;
}
result[id] = val;
}
}
return result;
}
</script>';
$result .= '<input type="button" onclick="' . htmlspecialcharsbx($jsFunctionName) . '(WFSFormOptionsXFunction())" value="' . GetMessage("IBD_DOCUMENT_XFORMOPTIONS3") . '">';
}
return $result;
//.........这里部分代码省略.........
示例15: GetPathTemplateParam
public static function GetPathTemplateParam($menuType, $ID, $parameterName, $defaultValue = "", $parentID = "URL_TEMPLATES")
{
return array(
"PARENT" => $parentID,
"NAME" => $parameterName,
"TYPE" => "CUSTOM",
"DEFAULT" => $defaultValue,
"JS_FILE" => FX_ROOT."/js/iblock/path_templates.js",
"JS_EVENT" => "IBlockComponentProperties",
"JS_DATA" => str_replace("\n", "", CUtil::PhpToJSObject(array(
"mnu_".$ID, //menu div ID
5000, //zIndex
CIBlockParameters::GetPathTemplateMenuItems($menuType, "window.IBlockComponentPropertiesObj.Action", "mnu_".$ID), //Menu items
))),
);
}