A partner has run into an issue where the variation attribute values doesn't have the 'image' nor 'image_swatch' properties. This PR adds the parsing of these values. As well as a few other properties.
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update
Changes
Added image and image_swatch properties on the VariationAttributeValue model
Added represented_product and represented_products on the ProductSearchHit model
Created ProductRef model
How to test this PR?
You can test this PR by following the below steps:
Clone and npm ci the mobify-platform-sdks project
Clone this repo (particularly this branch)
Link these projects by first installing and building the commercecloud-ocapi-client then running npm link
In the packages/commerce-integrations folder of the sdks project run npm link ../../../commercecloud-ocapi-client
Once these are linked you can run the explore project packages/explorer and previewing here
Search for some products and you should now see the correct content in the models.
Checklist:
[ ] My code follows the style guidelines of this project (npm run lint)
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation (README.md and CHANGELOG.md)
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes (npm test)
A partner has run into an issue where the variation attribute values doesn't have the 'image' nor 'image_swatch' properties. This PR adds the parsing of these values. As well as a few other properties.
Type of change
Changes
image
andimage_swatch
properties on the VariationAttributeValue modelrepresented_product
andrepresented_products
on the ProductSearchHit modelProductRef
modelHow to test this PR?
You can test this PR by following the below steps:
npm ci
themobify-platform-sdks
projectcommercecloud-ocapi-client
then runningnpm link
packages/commerce-integrations
folder of the sdks project runnpm link ../../../commercecloud-ocapi-client
packages/explorer
and previewing hereChecklist:
npm run lint
)README.md
andCHANGELOG.md
)npm test
)