2namespace Bitrix\Sale\Delivery\Restrictions;
4use Bitrix\Sale\Delivery\Restrictions;
5use Bitrix\Main\Localization\Loc;
6use Bitrix\Sale\Internals\Entity;
7use Bitrix\Sale\Shipment;
9Loc::loadMessages(__FILE__);
20 return Loc::getMessage(
"SALE_DLVR_RSTR_BY_MAXSIZE_NAME");
25 return Loc::getMessage(
"SALE_DLVR_RSTR_BY_MAXSIZE_DESCRIPT");
34 public static function check($dimensionsList,
array $restrictionParams, $deliveryId = 0)
36 if(empty($restrictionParams))
39 $maxSize = intval($restrictionParams[
"MAX_SIZE"]);
44 foreach($dimensionsList as $dimensions)
46 if(!is_array($dimensions))
49 foreach($dimensions as $dimension)
51 if(intval($dimension) <= 0)
54 if(intval($dimension) > $maxSize)
68 foreach(
$entity->getShipmentItemCollection() as $shipmentItem)
70 $basketItem = $shipmentItem->getBasketItem();
75 $dimensions = $basketItem->getField(
"DIMENSIONS");
77 if(is_string($dimensions))
78 $dimensions = unserialize($dimensions, [
'allowed_classes' =>
false]);
94 'LABEL' => Loc::getMessage(
"SALE_DLVR_RSTR_BY_MAXSIZE_SIZE")
static extractParams(Entity $entity)
static check($dimensionsList, array $restrictionParams, $deliveryId=0)
static getClassDescription()
static getParamsStructure($entityId=0)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)