diff --git a/core/lib/Thelia/Action/Cart.php b/core/lib/Thelia/Action/Cart.php index e41309279..6ef171c41 100755 --- a/core/lib/Thelia/Action/Cart.php +++ b/core/lib/Thelia/Action/Cart.php @@ -86,6 +86,7 @@ class Cart implements EventSubscriberInterface ; $cartItem = new CartItem(); + $cartItem->setDisptacher($event->getDispatcher()); $cartItem ->setCart($cart) ->setProductId($form->get("product")->getData()) diff --git a/core/lib/Thelia/Core/Event/CartItemEvent.php b/core/lib/Thelia/Core/Event/CartItemEvent.php new file mode 100644 index 000000000..710e44473 --- /dev/null +++ b/core/lib/Thelia/Core/Event/CartItemEvent.php @@ -0,0 +1,42 @@ +. */ +/* */ +/*************************************************************************************/ + +namespace Thelia\Core\Event; + + +use Thelia\Model\CartItem; + +class CartItemEvent extends InternalEvent { + + protected $cartItem; + + public function __construct(CartItem $cartItem) + { + $this->cartItem = $cartItem; + } + + public function getCartItem() + { + return $this->cartItem; + } +} \ No newline at end of file