Skip to content

feat(vtex): add additionalSearchParams to PLP loader#1515

Open
vibegui wants to merge 1 commit intomainfrom
feat/vtex-plp-additional-search-params
Open

feat(vtex): add additionalSearchParams to PLP loader#1515
vibegui wants to merge 1 commit intomainfrom
feat/vtex-plp-additional-search-params

Conversation

@vibegui
Copy link
Contributor

@vibegui vibegui commented Jan 19, 2026

Add support for passing additional query parameters to the VTEX Intelligent Search API. This enables features like VTEX Ads (showSponsored, placement) without requiring a fork of the apps repo.

Example usage:

{
  "additionalSearchParams": [
    { "key": "showSponsored", "value": "true" },
    { "key": "placement", "value": "top-search" }
  ]
}

What is this Contribution About?

Please provide a brief description of the changes or enhancements you are proposing in this pull request.

Issue Link

Please link to the relevant issue that this pull request addresses:

Loom Video

Record a quick screencast describing your changes to help the team understand and review your contribution. This will greatly assist in the review process.

Demonstration Link

Provide a link to a branch or environment where this pull request can be tested and seen in action.

Summary by CodeRabbit

  • New Features
    • Added the ability to pass additional search parameters to product listing pages using configurable key-value pairs. These parameters integrate seamlessly into search API requests and cache key generation mechanisms, providing more granular control over search result customization while enabling improved flexibility for refining search behavior and enhancing overall system performance.

✏️ Tip: You can customize this high-level summary in your review settings.

Add support for passing additional query parameters to the VTEX
Intelligent Search API. This enables features like VTEX Ads
(showSponsored, placement) without requiring a fork of the apps repo.

Example usage:
```json
{
  "additionalSearchParams": [
    { "key": "showSponsored", "value": "true" },
    { "key": "placement", "value": "top-search" }
  ]
}
```

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

Tagging Options

Should a new tag be published when this PR is merged?

  • 👍 for Patch 0.133.25 update
  • 🎉 for Minor 0.134.0 update
  • 🚀 for Major 1.0.0 update

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

📝 Walkthrough

Walkthrough

The change introduces an optional additionalSearchParams property to the productListingPage loader's Props interface, enabling consumers to pass custom key-value search parameters. These parameters are consistently integrated into VTEX Intelligent Search API calls and cache key generation.

Changes

Cohort / File(s) Summary
Search Parameter Enhancement
vtex/loaders/intelligentSearch/productListingPage.ts
Added additionalSearchParams?: { key: string; value: string }[] property to Props interface; integrated into product_search and facets API requests via spread operator; included in cacheKey serialization for cache consistency (+24 lines)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • viktormarinho

Poem

🐰 A param here, a param there,
Additional search beyond compare,
Cache keys sing with values new,
VTEX requests hopping through! ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive The description includes a useful explanation and usage example, but the required template sections (Issue Link, Loom Video, Demonstration Link) are incomplete with only placeholder text. Provide the actual issue link, Loom video link, and demonstration link to complete the required template sections as specified in the repository guidelines.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat(vtex): add additionalSearchParams to PLP loader' clearly summarizes the main change - adding a new feature to pass additional search parameters to the VTEX PLP loader.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant