Appearance
useProductSearch ​
Definition ​
Composable for product search.
Signature ​
ts
export function useProductSearch(): {
search: (
productId: string,
options?: {
withCmsAssociations?: boolean;
criteria?: Partial<Schemas["Criteria"]>;
},
) => Promise<Schemas["ProductDetailResponse"]>;
}
Return type ​
ts
{
search: (
productId: string,
options?: {
withCmsAssociations?: boolean;
criteria?: Partial<Schemas["Criteria"]>;
},
) => Promise<Schemas["ProductDetailResponse"]>;
}
Properties ​
Name | Type | Description |
---|
Usage ​
ts
import { useProductSearch } from "@shopware-pwa/composables-next";
const { search } = useProductSearch();