Menu
Feedback
Start here

Known issues

Known issues
Banner not respecting the specificity of the search level in search pages
Intelligent Search
ID: 566809
Backlog
Published on10/11/2022
Last updated on11/25/2022
1 min read

Summary

If we have a banner for a department and another one for a category inside this department, the banner query won't respect the specificity of the category tree, we will always get the first one of the API

https://github.com/vtex-apps/search/blob/26307cb3e2466a385a6c90565e076600d637509b/react/components/Banner/index.tsx#L75-L79

This is applied to the entire category tree or specification levels

Simulation

  • Go to: /admin/search/banners/
  • Create a banner for a department (it should be created first)
  • Create a banner for a category inside this department
  • Go to the category page (client's site)
  • It will match both and will return the first one to be shown

Workaround

Create banners for the more specific ones first and after that for the more generic ones. Example: Create banners first for subcategories first, then categories, and then department

OR

Create all banners that you want to use, and then, deactivate and activate the more generic banners following the rule that I shared previously. Example: Deactivate and activate Subcategories, then Categories, and then Departments

it will guarantee that the most generic banners will be displayed as the last one in the API response

https://search.biggylabs.com.br/search-api/v1/AccountName/api/split/banner_search/category-1/yourDepartment/category-2/yourCategory

Contributors
1
Photo of the contributor
+ 1 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
1
Photo of the contributor
+ 1 contributors
On this page
Still got questions?
Ask the community
Find solutions and share ideas in the VTEX Community
Join our community
Request VTEX support
For personalized assistance, contact our experts
Open a support ticket
GitHubDeveloper PortalCommunityFeedback