mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
add dedicated filters for models and years
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
@@ -39,7 +39,7 @@ import {
|
||||
getCollectionProductsQuery,
|
||||
getCollectionQuery,
|
||||
getCollectionsQuery,
|
||||
getTransmissionCodesQuery
|
||||
getProductFiltersQuery
|
||||
} from './queries/collection';
|
||||
import { getCustomerQuery } from './queries/customer';
|
||||
import { getMenuQuery } from './queries/menu';
|
||||
@@ -1188,7 +1188,7 @@ export async function getProductFilters(
|
||||
const _make = Array.isArray(make) ? make : make ? [make] : undefined;
|
||||
|
||||
const res = await shopifyFetch<ShopifyCollectionProductsOperation>({
|
||||
query: getTransmissionCodesQuery,
|
||||
query: getProductFiltersQuery,
|
||||
tags: [TAGS.collections, TAGS.products],
|
||||
variables: {
|
||||
handle: collection,
|
||||
|
@@ -79,8 +79,8 @@ export const getCollectionProductsQuery = /* GraphQL */ `
|
||||
${productFragment}
|
||||
`;
|
||||
|
||||
export const getTransmissionCodesQuery = /* GraphQL */ `
|
||||
query getTransmissionCodes($handle: String!, $filters: [ProductFilter!]) {
|
||||
export const getProductFiltersQuery = /* GraphQL */ `
|
||||
query getProductFilters($handle: String!, $filters: [ProductFilter!]) {
|
||||
collection(handle: $handle) {
|
||||
products(first: 1, filters: $filters) {
|
||||
filters {
|
||||
|
Reference in New Issue
Block a user