本文整理匯總了PHP中CSaleDeliveryHandler::checkDimensions方法的典型用法代碼示例。如果您正苦於以下問題:PHP CSaleDeliveryHandler::checkDimensions方法的具體用法?PHP CSaleDeliveryHandler::checkDimensions怎麽用?PHP CSaleDeliveryHandler::checkDimensions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CSaleDeliveryHandler
的用法示例。
在下文中一共展示了CSaleDeliveryHandler::checkDimensions方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Compability
function Compability($arOrder, $arConfig)
{
$result = array();
$aviableBoxes = CSaleDeliveryHelper::getBoxesFromConfig('distant_inner', $arConfig);
foreach ($aviableBoxes as $arBox) {
if (CSaleDeliveryHandler::checkDimensions($arOrder["MAX_DIMENSIONS"], $arBox["DIMENSIONS"])) {
$result = array('distant_inner');
break;
}
}
return $result;
}
示例2: Compability
function Compability($arOrder, $arConfig)
{
if (floatval($arOrder["WEIGHT"]) <= self::$MAX_WEIGHT) {
$profiles = array('ware', 'door');
} else {
$profiles = array();
}
$arRes = array();
foreach ($profiles as $profile) {
$aviableBoxes = CSaleDeliveryHelper::getBoxesFromConfig($profile, $arConfig);
foreach ($aviableBoxes as $arBox) {
if (CSaleDeliveryHandler::checkDimensions($arOrder["MAX_DIMENSIONS"], $arBox["DIMENSIONS"])) {
$arRes[] = $profile;
break;
}
}
}
return $arRes;
}
示例3: Compability
function Compability($arOrder, $arConfig)
{
$profiles = array('land', 'avia');
$bHevyWeightEnabled = self::isConfCheckedVal($arConfig, 'service_' . self::$TARIF_HEAVY_WEIGHT . '_enabled');
$maxWeight = $bHevyWeightEnabled ? self::$MAX_WEIGHT_HEAVY : self::$MAX_WEIGHT;
if (!empty($arOrder["ITEMS"]) && is_array($arOrder["ITEMS"])) {
foreach ($arOrder["ITEMS"] as $arItem) {
if (floatval($arItem["WEIGHT"]) > $maxWeight) {
$profiles = array();
break;
}
}
}
$arRes = array();
foreach ($profiles as $profile) {
$aviableBoxes = CSaleDeliveryHelper::getBoxesFromConfig($profile, $arConfig);
foreach ($aviableBoxes as $arBox) {
if (CSaleDeliveryHandler::checkDimensions($arOrder["MAX_DIMENSIONS"], $arBox["DIMENSIONS"])) {
$arRes[] = $profile;
break;
}
}
}
return $arRes;
}