Exemplo n.º 1
0
				$arProperty_OffersWithoutFile[$propertyCode] = $propertyName;
		}
		unset($propertyCode, $propertyName, $property, $propertyIterator);
	}
}

$arSort = CIBlockParameters::GetElementSortFields(
	array('SHOWS', 'SORT', 'TIMESTAMP_X', 'NAME', 'ID', 'ACTIVE_FROM', 'ACTIVE_TO'),
	array('KEY_LOWERCASE' => 'Y')
);

$arPrice = array();
if ($catalogIncluded)
{
	$arSort = array_merge($arSort, CCatalogIBlockParameters::GetCatalogSortFields());
	$arPrice = CCatalogIBlockParameters::getPriceTypesList();
}
else
{
	$arPrice = $arProperty_N;
}

$arAscDesc = array(
	"asc" => GetMessage("IBLOCK_SORT_ASC"),
	"desc" => GetMessage("IBLOCK_SORT_DESC"),
);

$arComponentParameters = array(
	"GROUPS" => array(
		"ACTION_SETTINGS" => array(
			"NAME" => GetMessage('IBLOCK_ACTIONS')
Exemplo n.º 2
0
	while($arr=$rsProp->Fetch())
	{
		if($arr["PROPERTY_TYPE"] != "F")
			$arProperty_Offers[$arr["CODE"]] = "[".$arr["CODE"]."] ".$arr["NAME"];
	}
}

$arSort = CIBlockParameters::GetElementSortFields(
	array('SHOWS', 'SORT', 'TIMESTAMP_X', 'NAME', 'ID', 'ACTIVE_FROM', 'ACTIVE_TO'),
	array('KEY_LOWERCASE' => 'Y')
);

$arPrice = array();
if ($boolCatalog)
{
	$arSort = array_merge($arSort, CCatalogIBlockParameters::GetCatalogSortFields());
	$rsPrice=CCatalogGroup::GetListEx(
		array("SORT" => "ASC"),
		array(),
		false,
		false,
		array('ID', 'NAME', 'NAME_LANG')
	);
	while($arr=$rsPrice->Fetch())
		$arPrice[$arr["NAME"]] = "[".$arr["NAME"]."] ".$arr["NAME_LANG"];
}
else
{
	$arPrice = $arProperty_N;
}
Exemplo n.º 3
0
        $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"]);
}