Beispiel #1
0
												<b>Перекрытие</b></br>												
												монолитные перекрытия
										</div>
								</div>
								!-->
						</div>
				</div>
				<div class="b_page_3" id="tab2">
						<div class="b_title">Состав проекта</div>
						<div class="clear"></div>
						<?php 
global $USER;
if ($USER->isAdmin()) {
    $arOptionStatus = \Bq\Options\OptionsTable::getStatusList();
    $params = array("filter" => array("ACTIVE" => "Y", "SECTION_ID" => array(0, $arResult["IBLOCK_SECTION_ID"])), "order" => array("SORT" => "ASC"));
    $res = Bq\Options\OptionsTable::getList($params);
    $arIDs = false;
    $arOptions = false;
    while ($ar = $res->fetch()) {
        $arOptions[$ar["ID"]] = $ar;
        $arIDs[] = $ar["ID"];
    }
    if ($arIDs) {
        $params = array("filter" => array("OPTIONS_ID" => $arIDs, "ELEMENT_ID" => array($arResult["ID"])), "order" => array("LEVEL" => "ASC"));
        if ((int) $arResult["PROPERTIES"]["ARCHITECT"]["VALUE"] > 0) {
            $params["filter"]["ELEMENT_ID"][] = $arResult["PROPERTIES"]["ARCHITECT"]["VALUE"];
        }
        if ((int) $arResult["PROPERTIES"]["COMPANY"]["VALUE"] > 0) {
            $params["filter"]["ELEMENT_ID"][] = $arResult["PROPERTIES"]["COMPANY"]["VALUE"];
        }
        $res = Bq\Options\TreeTable::getList($params);
Beispiel #2
0
<?php

\Bitrix\Main\Loader::IncludeModule("bq.options");
use Bq\Options;
$arOptionStatus = \Bq\Options\OptionsTable::getStatusList();
$options = new \Bq\Options\OptionsTable();
foreach ($arResult["GRID"]["ROWS"] as $k => $arItem) {
    if ($arItem["MODULE"] == "bq.options") {
        unset($arResult["GRID"]["ROWS"][$k]);
    }
}
foreach ($arResult["GRID"]["ROWS"] as $k => $arItem) {
    $param = array("ID" => $arItem["PRODUCT_ID"], "SECTION_ID" => $arItem["CATALOG"]["SECTION_ID"], "COMPANY_ID" => $arItem["PROPERTY_COMPANY_CODE_VALUE"], "ARCHITECT_ID" => $arItem["PROPERTY_ARCHITECT_CODE_VALUE"]);
    $arResult["GRID"]["ROWS"][$k]["OPTIONS"] = $options->getByProduct($param);
}