• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/basketcomponenthelper.php
  • Класс: BitrixSaleBasketComponentHelper
  • Вызов: BasketComponentHelper::getFUserBasketPrice
static function getFUserBasketPrice($fuserId, $siteId = null)
{
	if ($fuserId === null)
	{
		return 0;
	}
	if ($siteId === null)
	{
		$siteId = SITE_ID;
	}

	$price = null;
	if (!empty($_SESSION['SALE_USER_BASKET_PRICE'][$siteId]) && is_array($_SESSION['SALE_USER_BASKET_PRICE'][$siteId])
		&& array_key_exists($fuserId, $_SESSION['SALE_USER_BASKET_PRICE'][$siteId]))
	{
		$price = $_SESSION['SALE_USER_BASKET_PRICE'][$siteId][$fuserId];
	}

	if ($price === null)
	{
		static::updateFUserBasketPrice($fuserId, $siteId);
		$price = $_SESSION['SALE_USER_BASKET_PRICE'][$siteId][$fuserId];
	}

	return $price;
}