Skip to content

Commit 6bcf985

Browse files
guitavanoclaude
andauthored
fix(vtex): filter unavailable items in PDPDefaultPath (#1637)
Switch from legacy to intelligent search productList and enable hideUnavailableItems to prevent unavailable products from being returned as default PDP paths. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b562530 commit 6bcf985

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

vtex/loaders/paths/PDPDefaultPath.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { DefaultPathProps } from "../../../website/pages/Page.tsx";
22
import { AppContext } from "../../mod.ts";
3-
import productList from "../legacy/productList.ts";
3+
import productList from "../intelligentSearch/productList.ts";
44

55
export interface Props {
66
count: number;
@@ -20,9 +20,10 @@ const loader = async (
2020
const response = await productList(
2121
{
2222
props: {
23-
term: "",
23+
query: "",
2424
count,
25-
sort: "OrderByTopSaleDESC",
25+
sort: "orders:desc",
26+
hideUnavailableItems: true,
2627
},
2728
},
2829
req,

0 commit comments

Comments
 (0)