Error in user YAML: (<unknown>): found character that cannot start any token while scanning for the next token at line 5 column 16
---
title: Dispatch cart line item events
issue: NEXT-12478
author: Kevin C.
author_email: [email protected]
author_github: @maqavelli
---
- Added new events
Shopware\Core\Checkout\Cart\Event\AfterLineItemAddedEvent
,Shopware\Core\Checkout\Cart\Event\AfterLineItemRemovedEvent
,Shopware\Core\Checkout\Cart\Event\AfterLineItemQuantityChangedEvent
. - Changed method
add()
inShopware\Core\Checkout\Cart\SalesChannel\CartItemAddRoute
to dispatchShopware\Core\Checkout\Cart\Event\AfterLineItemAddedEvent
when an item is added to the cart. - Changed method
remove()
inShopware\Core\Checkout\Cart\SalesChannel\CartItemRemoveRoute
to dispatchShopware\Core\Checkout\Cart\Event\AfterLineItemRemovedEvent
when an item is removed from the cart. - Changed method
change()
inShopware\Core\Checkout\Cart\SalesChannel\CartItemUpdateRoute
to dispatchShopware\Core\Checkout\Cart\Event\AfterLineItemQuantityChangedEvent
when the quantity of an item in the cart is changed. - Deprecated
Shopware\Core\Checkout\Cart\Event\LineItemAddedEvent
and is replaced withShopware\Core\Checkout\Cart\Event\BeforeLineItemAddedEvent
. - Deprecated
Shopware\Core\Checkout\Cart\Event\LineItemRemovedEvent
and is replaced withShopware\Core\Checkout\Cart\Event\BeforeLineItemRemovedEvent
. - Deprecated
Shopware\Core\Checkout\Cart\Event\LineItemQuantityChangedEvent
and is replaced withShopware\Core\Checkout\Cart\Event\BeforeLineItemQuantityChangedEvent
.