-
Notifications
You must be signed in to change notification settings - Fork 80
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
AddToCard action not throwing an consumable response if product is out-of-stock #917
Comments
@adobe export issue to Jira project CIF |
✅ Jira issue CIF-2904 is successfully created for this GitHub issue. |
You are right, we have a mechanism for that for the wish list. Doing the same for add to cart would certainly be useful. |
Thanks for the hint. Yes, similar solution in the "Add to Cart" event would be helpful. In addition: Also the name of the product itself in here: https://github.com/adobe/aem-core-cif-components/blob/master/ui.apps/src/main/content/jcr_root/apps/core/cif/components/commerce/product/v1/product/clientlib/js/addToCart.js#L117-L120 would help to build a helpful user-interface. |
|
Expected Behaviour
If add to cart query is running against an out-of-stock product it should expose the error to the frontend. Otherwise it's impossible to implement a user interface an inform the user.
Actual Behaviour
Request that is trigged by the DOM event
aem.cif.add-to-cart
throw the following error:Reproduce Scenario (including but not limited to)
Product must be out-of-stock
Steps to Reproduce
Platform and Version
AEM v6.9
CIF components, v2.4.0
(Magento Cloud)
Sample Code that illustrates the problem
No example needed.
Logs taken while reproducing problem
Browser console see above.
The text was updated successfully, but these errors were encountered: