79370126

Date: 2025-01-20 01:57:21
Score: 0.5
Natty:
Report link

Solved my own question:

It was not correctly added, because the underlying product was not activated and made available to the storefront channel. My bad. So it adds the lineitem, but the persister->save() discards the item, but the controller still generates an AfterLineItemAdded event, as it is technically after adding a line item. This leads to the endless loop, as the cart still does not contain the product, trying to build it again, etc etc

All the methods above worked to add a LineItem into a cart, the error message "Invalid Product" on the cart was the relevant help.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Sistason