3namespace Bitrix\Catalog\Controller;
5use Bitrix\Catalog\Product\PropertyCatalogFeature;
6use Bitrix\Iblock\PropertyFeatureTable;
32 if (!$checkPropertyResult->isSuccess())
34 $this->addErrors($checkPropertyResult->getErrors());
48 'FEATURES' => PropertyCatalogFeature::getPropertyFeatureList($property),
59 if (!$checkFieldsResult->isSuccess())
61 $this->addErrors($checkFieldsResult->getErrors());
65 $propertyId = (int)
$fields[
'PROPERTY_ID'];
68 $addResult = PropertyCatalogFeature::addFeatures($propertyId, [
$fields]);
69 if (!$addResult->isSuccess())
71 $this->addErrors($addResult->getErrors());
75 $propertyFeatureId = current($addResult->getData());
96 $existsResult = $this->
exists($id);
97 if (!$existsResult->isSuccess())
99 $this->addErrors($existsResult->getErrors());
104 if (!$checkFieldsResult->isSuccess())
106 $this->addErrors($checkFieldsResult->getErrors());
110 $propertyId = (int)
$fields[
'PROPERTY_ID'];
112 $updateResult = PropertyCatalogFeature::updateFeatures($propertyId, [
$fields]);
115 $this->addErrors($updateResult->getErrors());
127 protected function get($id)
130 'select' => [
'*',
'IBLOCK_ID' =>
'PROPERTY.IBLOCK_ID'],
131 'filter' => [
'=ID' => $id],
141 $propertyFeature = $this->
get($id);
142 if (!$propertyFeature || !$this->
isIblockCatalog((
int)$propertyFeature[
'IBLOCK_ID']))
155 return PropertyFeatureTable::class;
163 if (
$name ===
'getavailablefeaturesbyproperty')
168 return parent::checkPermissionEntity(
$name);
getErrorEntityNotExists()
checkReadPermissionEntity()
checkProperty(int $propertyId)
checkFieldsBeforeModify(array $fields)
isIblockCatalog(int $iblockId)
modifyListActionParameters(array $params)
updateAction(int $id, array $fields)
getAvailableFeaturesByPropertyAction(int $propertyId)
checkPermissionEntity($name, $arguments=[])
static getRow(array $parameters)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']