vtex-apps / store-discussion

VTEX IO store builders' community
80 stars 5 forks source link

Return more than 12 similar products #706

Closed pedrobernardina closed 1 month ago

pedrobernardina commented 11 months ago

What problem are you trying to solve?.

We'd like to be able to return more than 12 similar products. Currently there's a hardcoded param on the method crossSelling on search client that would be better being parameterized.

In the Fashion segment it's common to have different product colours as different (similar) products instead of SKUs due to the limited number of SKUs we can have on the platform. There's a limitation in the current implementation that caps the number of similar products to 12, forcing us to make extra API calls.

Describe the solution you'd like Parameterize the groupByProduct variable.

Why do you think this feature should be available to all stores? Because this is a common situation in fashion, and we believe stores should be able to fetch all similar products if they need to. Also, the fewer the API calls the better.

Describe alternatives you've considered We've used a node service to make a REST API call to return all similar products. We've also deployed our own customized search-resolver instance.

Additional context We've opened 2 MRs that implement this feature.

https://github.com/vtex-apps/search-graphql/pull/128 https://github.com/vtex-apps/search-resolver/pull/460

mihainutiu-vtex commented 2 months ago

Hi @pedrobernardina The team merged these PRs that should solve this issue:

#282 #135 #467