- Модуль: catalog
- Путь к файлу: ~/bitrix/modules/catalog/lib/product/sku.php
- Класс: BitrixCatalogProductSku
- Вызов: Sku::setCalculateData
static function setCalculateData(array &$list, $id, $iblockId)
{
static $priceTypes = null,
$priceTypeKeys;
self::$calculateAvailable = true;
if ($priceTypes === null)
{
$priceTypes = array_keys(CatalogGroupTable::getTypeList());
$priceTypeKeys = array_fill_keys($priceTypes, true);
}
self::$calculatePriceTypes = $priceTypeKeys;
if ($iblockId === null)
{
if (isset($list[$id]))
{
$iblockId = $list[$id]['IBLOCK_ID'];
}
}
$list[$id] = [
'IBLOCK_ID' => $iblockId,
self::ACTION_AVAILABLE => true,
self::ACTION_PRICE => self::$calculatePriceTypes,
self::ACTION_ELEMENT_TIMESTAMP => true,
];
}