- Модуль: sale
- Путь к файлу: ~/bitrix/modules/sale/lib/delivery/restrictions/byprice.php
- Класс: BitrixSaleDeliveryRestrictionsByPrice
- Вызов: ByPrice::checkByEntity
static function checkByEntity(Entity $shipment, array $restrictionParams, $mode, $deliveryId = 0)
{
$severity = self::getSeverity($mode);
if($severity == RestrictionManager::SEVERITY_NONE)
return RestrictionManager::SEVERITY_NONE;
$price = self::extractParams($shipment);
$sCurrency = $shipment->getCurrency();
if (!empty($sCurrency) && !empty($restrictionParams["CURRENCY"]) && BitrixMainLoader::includeModule('currency'))
{
$price = CCurrencyRates::convertCurrency(
$price,
$sCurrency,
$restrictionParams["CURRENCY"]
);
}
$res = self::check($price, $restrictionParams, $deliveryId);
return $res ? RestrictionManager::SEVERITY_NONE : $severity;
}