Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/stable-carousel-product-ids.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@bigcommerce/catalyst-makeswift': patch
---

Sort the `ProductsCarousel` additional product IDs in the request URL so the same products always hit the same cache entry, regardless of their order in the editor.
2 changes: 1 addition & 1 deletion core/lib/makeswift/utils/use-products.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function useProducts({ collection, collectionLimit = 20, additionalProduc

const searchParams = new URLSearchParams();

searchParams.append('ids', additionalProductIds.join(','));
searchParams.append('ids', [...additionalProductIds].sort().join(','));
searchParams.append('locale', locale);

const additionalProductsUrl = `/api/products/ids?${searchParams.toString()}`;
Expand Down
Loading