43 if ($entity ===
"property")
47 if ($this->skuIblockId && $this->skuList)
50 $this->
property->setIblockId($this->skuIblockId);
57 elseif ($entity ===
"price")
61 if ($this->skuIblockId && $this->skuList)
70 return parent::resolve($entity);
81 if (!isset($this->fields))
83 $this->fields = array();
84 $select = array_values($this->fieldMap);
86 $elementList = \Bitrix\Iblock\ElementTable::getList(array(
88 "filter" => array(
"=ID" => $this->
id),
90 $this->elementFields = $elementList->fetch();
91 if ($this->elementFields)
93 $catalog = \CCatalogSKU::getInfoByProductIBlock($this->elementFields[
"IBLOCK_ID"]);
96 $this->skuIblockId = $catalog[
"IBLOCK_ID"];
97 $skuList = \CIBlockElement::getList(array(), array(
98 "IBLOCK_ID" => $catalog[
"IBLOCK_ID"],
99 "=PROPERTY_".$catalog[
"SKU_PROPERTY_ID"] => $this->
id,
100 ),
false,
false, $select);
103 $this->skuList[] = $sku;
104 foreach($sku as $fieldName => $fieldValue)
106 $this->fields[$fieldName][] = $fieldValue;
113 return is_array($this->fields);