getCurrentProductWithVariations function from VTEX.js brings data from Component SKU and not from KIT SKU.
Portal
•
ID: 324416
No Fix
Published on3/16/2022
•
Last updated on2/16/2024
1 min read
Summary
Function getCurrentProductWithVariations
from VTEX.js brings data from Component SKU instead of KIT SKU.
Simulation
- Access a PDP from a KIT Product;
- Use the function getCurrentProductWithVariations to get data from the KIT;
- Check that the response is from the SKU Components, and not from the KIT SKU.
Workaround
Use the function getProductWithVariations({productId})
as a workaround. In this case, we have to use the Product ID from this KIT.