- Модуль: sale
- Путь к файлу: ~/bitrix/modules/sale/lib/controller/action/entity/changebasketitemaction.php
- Класс: BitrixSaleControllerActionEntityChangeBasketItemAction
- Вызов: ChangeBasketItemAction::getBasketProperties
static function getBasketProperties(int $iblockId, int $productId, array $offerPropertyCodeList)
{
$newProperties = CIBlockPriceTools::GetOfferProperties(
$productId,
$iblockId,
$offerPropertyCodeList
);
$basketProperties = [];
foreach ($newProperties as $row)
{
$codeExist = false;
foreach ($offerPropertyCodeList as $code)
{
if ($code === $row['CODE'])
{
$codeExist = true;
break;
}
}
if (!$codeExist)
{
continue;
}
$basketProperties[$row['CODE']] = [
'NAME' => $row['NAME'],
'CODE' => $row['CODE'],
'VALUE' => $row['VALUE'],
'SORT' => $row['SORT'],
];
}
return $basketProperties;
}