AfterLineItemRemovedEvent example

$cart->remove($id);

            $this->eventDispatcher->dispatch(new BeforeLineItemRemovedEvent($lineItem$cart$context));

            $cart->markModified();
        }

        $cart = $this->cartCalculator->calculate($cart$context);
        $this->cartPersister->save($cart$context);

        $this->eventDispatcher->dispatch(new AfterLineItemRemovedEvent($lineItems$cart$context));

        $this->eventDispatcher->dispatch(new CartChangedEvent($cart$context));

        return new CartResponse($cart);
    }
}
Home | Imprint | This part of the site doesn't use cookies.