Skip to content

Add the selectedProperties to products.gql - #190

Open
juliabrzvtex wants to merge 1 commit into
vtex-apps:masterfrom
juliabrzvtex:patch-1
Open

Add the selectedProperties to products.gql#190
juliabrzvtex wants to merge 1 commit into
vtex-apps:masterfrom
juliabrzvtex:patch-1

Conversation

@juliabrzvtex

Copy link
Copy Markdown

What is the purpose of this pull request?

Add the selectedProperties to products.gql

What problem is this solving?

For stores that do the IS configuration to SKU specifications to display individual products in search results, a query string is added to the product link to direct it to the PDP correctly.

For the correct creation of the link with the query string, the product context must have the selectedProperties field https://github.com/vtex-apps/product-summary-context/blob/2db0baacbb46d5abca53999aac0a348c26916c09/react/ProductSummaryContext.tsx#L143

The problem is that the list-context.product-list context uses the products query from vtex.store-resources which does not have this field. https://github.com/vtex-apps/store-resources/blob/master/react/queries/products.gql

The PDP context already uses the productSearchV3 query which has the selectedProperties https://github.com/vtex-apps/store-resources/blob/master/react/queries/productSearchV3.gql

As in search-graphql this information is present in the products query, I just added it to products.gql.

How should this be manually tested?

Activate the configuration in the IS, and see that in the PLP, the product link has the query string property__${key}, but the same product on the shelf this query string is not present.

Screenshots or example usage

Search settings:

image

Workspace without the fix:
https://nofix--uniandes.myvtex.com/
image

Workspace with the fix:
https://pruebavtex--uniandes.myvtex.com/
image

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires change to documentation, which has been updated accordingly.

@vtex-io-ci-cd

vtex-io-ci-cd Bot commented Mar 19, 2025

Copy link
Copy Markdown
Contributor

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot

vtex-io-docs-bot Bot commented Mar 19, 2025

Copy link
Copy Markdown

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

@juliabrzvtex juliabrzvtex changed the title Adding the selectedProperties to products.gql Add the selectedProperties to products.gql Mar 19, 2025
@vsseixaso
vsseixaso requested review from Copilot and vsseixaso March 19, 2025 17:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • react/queries/products.gql: Language not supported

@vsseixaso
vsseixaso requested a review from iago1501 March 19, 2025 17:11
@vsseixaso vsseixaso added the bug Something isn't working label Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants