From a75b75f402002d430a681cb2020e2428cedc4dbe Mon Sep 17 00:00:00 2001 From: merelendor Date: Tue, 30 Apr 2024 17:32:52 +0300 Subject: [PATCH] API used cars total calculation update --- api/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/index.php b/api/index.php index 6c120a7..654937d 100644 --- a/api/index.php +++ b/api/index.php @@ -1477,7 +1477,7 @@ switch($PARAM_1) $filter['> "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']);