[Shopify]: add productType to product transformation #1003
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is this Contribution About?
Pull Request Description:
This Pull Request adds the
productType
value returned by Shopify to the product's additional properties. The change ensures that theproductType
, which was previously not being considered, is now correctly included. The implementation details are as follows:productType
value is extracted from theproduct
object returned by Shopify.PropertyValue
object is created with the name"productType"
, and its value is set to theproductType
value from the product.PropertyValue
is concatenated with other additional properties, such as the product description and metafields, within theadditionalProperty
array.Example:
Context:
In the current repository, there is some confusion with the
type
object returned by the Deco.cx CMS, which follows the schema.orgProduct
standard. This structure differs from the value returned by Shopify'sproductType
. To address this and ensure data integrity, we decided to include theproductType
value directly in the product's additional properties, making it easier to work with this data in the application.This change is necessary for implementing a feature for Zeedog Italy. It will allow us to correctly handle and display the product type as required by the feature's specifications.