diff options
| author | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-10-14 09:03:10 +0700 |
|---|---|---|
| committer | HATEC\SPVDEV001 <tri.susilo@altama.co.id> | 2023-10-14 09:03:10 +0700 |
| commit | 7ada2eab1773629a3f74fe1a16ba78227953f912 (patch) | |
| tree | 5a6237093db529f694789e2fed448ecb18483493 /src/pages | |
| parent | 26cee59f3abad5a9c45821ebdccc8ccb819c930b (diff) | |
add fillterby brand di kolom pencarian
Diffstat (limited to 'src/pages')
| -rw-r--r-- | src/pages/api/shop/search.js | 2 | ||||
| -rw-r--r-- | src/pages/shop/category/[slug].jsx | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/pages/api/shop/search.js b/src/pages/api/shop/search.js index 874431e0..fd7a215a 100644 --- a/src/pages/api/shop/search.js +++ b/src/pages/api/shop/search.js @@ -13,7 +13,7 @@ export default async function handler(req, res) { orderBy = '', operation = 'AND', fq = '', - limit = '', + limit = 0, stock = '' } = req.query diff --git a/src/pages/shop/category/[slug].jsx b/src/pages/shop/category/[slug].jsx index e3650235..6d3985a8 100644 --- a/src/pages/shop/category/[slug].jsx +++ b/src/pages/shop/category/[slug].jsx @@ -14,8 +14,12 @@ export default function CategoryDetail() { const categoryName = getNameFromSlug(slug) const categoryId = getIdFromSlug(slug) + const q = router?.query.q || null const query = { - fq: `manufacture_id_i:${categoryId}` + fq: `category_id_i:${categoryId}` + } + if (q) { + query.q = q } return ( |
