summaryrefslogtreecommitdiff
path: root/src/lib/category/api
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-08-22 13:10:29 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-08-22 13:10:29 +0700
commit5e2a8d315fa0bc58a18d4df5a995e402388995c9 (patch)
tree09602b444795a4c85a5e5a422662939333466ced /src/lib/category/api
parent24cc59486efbe9caebfb10228283ee515afb5934 (diff)
<iman> update category dropdown
Diffstat (limited to 'src/lib/category/api')
-rw-r--r--src/lib/category/api/popularProduct.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/category/api/popularProduct.js b/src/lib/category/api/popularProduct.js
index 48f8a2a0..3fdfc41c 100644
--- a/src/lib/category/api/popularProduct.js
+++ b/src/lib/category/api/popularProduct.js
@@ -3,7 +3,7 @@ export const fetchPopulerProductSolr = async (category_id_ids) => {
let sort ='sort=qty_sold_f desc';
try {
const queryParams = new URLSearchParams({ q: category_id_ids });
- const response = await fetch(`/solr/product/select?${queryParams.toString()}&rows=2000&fl=manufacture_name_s,manufacture_id_i,id,display_name_s,qty_sold_f&${sort}`);
+ const response = await fetch(`/solr/product/select?${queryParams.toString()}&rows=2000&fl=manufacture_name_s,manufacture_id_i,id,display_name_s,qty_sold_f,qty_sold_f&${sort}`);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
@@ -24,6 +24,7 @@ export const fetchPopulerProductSolr = async (category_id_ids) => {
name: promotion.display_name_s,
manufacture_name: promotion.manufacture_name_s,
manufacture_id: promotion.manufacture_id_i,
+ qty_sold: promotion.qty_sold_f,
};
result.push(data);
}