Пример #1
0
 function Compability($arOrder, $arConfig)
 {
     $arLocationFrom = CSaleHelper::getLocationByIdHitCached($arOrder["LOCATION_FROM"]);
     $arLocationTo = CDeliveryEMS::__GetLocation($arOrder["LOCATION_TO"]);
     if ($arConfig['category']['VALUE'] == 'doc' && $arOrder['WEIGHT'] > 2000) {
         return array();
     } elseif (CDeliveryEMS::__IsRussian($arLocationFrom) && $arOrder['WEIGHT'] <= 31500 && $arLocationTo['EMS_ID']) {
         return array('delivery');
     } else {
         return array();
     }
 }
Пример #2
0
	public static function Compability($arOrder, $arConfig)
	{
		$arLocationFrom = CSaleLocation::GetByID($arOrder["LOCATION_FROM"]);

		if ($arConfig['category']['VALUE'] == 'doc' && $arOrder['WEIGHT'] > 2000)
			return array();
		elseif (CDeliveryEMS::__IsRussian($arLocationFrom) && $arOrder['WEIGHT'] <= 31500)
			return array('delivery');
		else
			return array();
	}