Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Enhance Product Data Handling in DecoCX Schema.org Transformation #996

Merged

Conversation

pedrobernardina
Copy link
Contributor

@pedrobernardina pedrobernardina commented Jan 28, 2025

General Information

Discord Discussion

Environment

https://admin.deco.cx/sites/oficina-reserva/spaces/dashboard?env=fix%2Fsku-specs

Loaders Modified

  • Legacy PLP / PDP
  • Intelligent Search PLP / PDP

Problem

In the process of transforming DecoCX product data into the schema.org format, some important product attributes are being lost. These attributes might be necessary for specific use cases in the storefront, leading to limitations in the available data.

Proposed Solution

To address this issue, we propose adding an "Advanced Config" property to some loaders. This property would include an attribute named originalAttributesToInclude, which would be an array of strings representing the key names of the original attributes to retain.

These specified attributes would then be added to the additionalProperties field of the isVariantOf object, ensuring that the required data is preserved and accessible in the frontend.

Additional Context

  • Feedback from @guitavano: The product data on Deco is canonized, and the use of a generic string[] may be too broad.
  • One of the key challenges here is ensuring flexibility in accessing product attributes on the frontend without requiring separate PRs for every new attribute that might be needed.

Acceptance Criteria

  1. An Advanced Config prop is implemented in the relevant loaders.
  2. The originalAttributesToInclude array allows for retaining specific attributes during the schema transformation.
  3. Retained attributes are correctly added to the additionalProperties field in the isVariantOf object.
  4. Flexibility is achieved to add or remove attributes dynamically without requiring multiple PRs.

Impact

This change would streamline the process of retaining essential product attributes, reduce the need for repetitive development efforts, and ensure more robust and adaptable storefront implementations.

Copy link
Contributor

Tagging Options

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

  • 👍 for Patch 0.64.23 update
  • 🎉 for Minor 0.65.0 update
  • 🚀 for Major 1.0.0 update

@pedrobernardina pedrobernardina changed the title feat(VTEX): create advanced config options on PDP and PLP loaders Feat: Enhance Product Data Handling in DecoCX Schema.org Transformation Jan 28, 2025
@pedrobernardina pedrobernardina force-pushed the feat/add-advanced-config-to-loaders branch from 9495955 to b1483f8 Compare January 28, 2025 15:02
@matheusgr matheusgr merged commit a934621 into deco-cx:main Jan 29, 2025
1 check passed
@pedrobernardina pedrobernardina deleted the feat/add-advanced-config-to-loaders branch January 31, 2025 14:41
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.

2 participants