Cart.js Is Not Using The SelectedSKU Structure
(Doc ID 2613024.1)
Last updated on NOVEMBER 29, 2019
Applies to:Oracle Commerce Cloud Service - Version N/A and later
Information in this document applies to any platform.
On : 19.5.1 version, Storefront
When trying to add an item to the cart using the cart viewModel, the addItem function checks if an item is already added to the cart using the selectedSKU structure that is passed as a parameter, but later when it realizes that the product is not currently added to the cart the function uses childSKUs.repositoryId as the product catalog id instead of the selectedSKU.repositoryId.
This looks like an inconsistency, why is it checking for duplicate items, using a structure that should be injected to the product data model but when it is going to actually insert the item to the cart it is not using the same value?
Cart.js should use the same method to check if the item is already added to the cart and to insert the item, otherwise it would force us to remove every childSKUs except the one we are trying to add, this looks unnecessary and a makeshift workaround. This is affecting the behavior of our cart and the entire customer pipeline.
The issue can be reproduced at will with the following steps:
Add items to card
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document