[BUG] Problem with adding some products from the slider to the cart
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
As in the attached video try to add the product "Pepper white, Muntok pearl" directly from the slider to the cart, but despite the successful message product is not added, the same from the product card page (https://frontends-demo.vercel.app/Pepper-white-Muntok-pearl/SW10095M) works properly
https://github.com/shopware/frontends/assets/30267600/a249b045-dc60-4ba8-9085-5175f34b9bda
Expected Behavior
No response
Steps To Reproduce
No response
Environment
- OS:
- Node:
- pnpm:
Anything else?
No response
In packages/cms-base/components/SwProductCard.vue would solve "partial" the problem:
I do not like that we just display a SuccessMessage without waiting for a response or checking if the item has been added to the cart (the item is present in the line item response).
There are some other places where we also track some errors (templates/vue-demo-store/components/product/ProductCard.vue):
It would be nice to have a unified way to tell the user why something was not added.
For example, some variants cannot be added because of a lack of stock. See:
FYI @mdanilowicz, cause you are assigned to that issue :sweat_smile:
@BrocksiNet, the problem was not in the lack of stock.
After clicking add to cart, the 07c913c1205b4a60ac250c3d879143bf ID is added. This is an incorrect ID; the 22454675d6bf4196afb051b73669ad4a should be added. You can add this variant from the product page.
We are also unable to display any errors because the array with the errors is empty in the response - everything is ok - just nothing was added :D. So, it looks like the backend ignores the ID.
After removing and adding the product to the group again, everything returned to normal. I'm assuming that this was a problem with the cache/index.