API used cars total calculation update
This commit is contained in:
parent
b5b1c328bd
commit
a75b75f402
@ -1477,7 +1477,7 @@ switch($PARAM_1)
|
||||
$filter['><PROPERTY_MILEAGE'] = [ !empty($REQ['MILEAGE_FROM']) ? $REQ['MILEAGE_FROM'] : 0, !empty($REQ['MILEAGE_TO']) ? $REQ['MILEAGE_TO'] : 10000000 ];
|
||||
}
|
||||
|
||||
$total = CIBlockElement::GetList([ "SORT" => "ASC", "NAME" => "ASC" ], array_merge([ "IBLOCK_ID" => USED ? IBLOCK_ID_CATALOG_CARS_USED : IBLOCK_ID_CATALOG_CARS_NEW ], $filter), [], []);
|
||||
$total = CIBlockElement::GetList([ "SORT" => "ASC", "NAME" => "ASC" ], array_merge([ "IBLOCK_ID" => USED ? IBLOCK_ID_CATALOG_CARS_USED : IBLOCK_ID_CATALOG_CARS_NEW ], $filter), [], false, []);
|
||||
$result = [
|
||||
"total" => $total,
|
||||
"possible_volumes" => [],
|
||||
@ -1674,7 +1674,7 @@ switch($PARAM_1)
|
||||
}
|
||||
|
||||
//filter for modifications
|
||||
if(!empty($REQ['MODEL_ID']))
|
||||
if(!empty($REQ['MODEL_ID']) && !USED)
|
||||
{
|
||||
$filter_modifications = $filter;
|
||||
unset($filter_modifications['PROPERTY_MODIFICATION']);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user