Skip to content

Commit 740dc62

Browse files
mfaris9jorgemoya
authored andcommitted
fix(catalyst): TRAC-279 default brand PLP sort to featured (#3021)
Brand PLPs were defaulting to relevance, which is intended for search results. Pin the default to featured so unranked brand pages match the rest of the catalog.
1 parent 70112e3 commit 740dc62

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

.changeset/fix-brand-plp-sort.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@bigcommerce/catalyst-core": patch
3+
---
4+
5+
Default brand PLP sort to `featured` to honor the merchant's product sort order.

core/app/[locale]/(default)/(faceted)/brand/[slug]/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,14 @@ export default async function Brand(props: Props) {
116116

117117
const loadSearchParams = await createBrandSearchParamsLoader(slug, customerAccessToken);
118118
const parsedSearchParams = loadSearchParams?.(searchParams) ?? {};
119+
const sort = typeof searchParams.sort === 'string' ? searchParams.sort : 'featured';
119120

120121
const search = await fetchFacetedSearch(
121122
{
122123
...searchParams,
123124
...parsedSearchParams,
124125
brand: [slug],
126+
sort,
125127
},
126128
currencyCode,
127129
customerAccessToken,

0 commit comments

Comments
 (0)