create a new event fire when cart item is duplicated

This commit is contained in:
Manuel Raynaud
2014-04-09 17:05:18 +02:00
parent ad58b27b00
commit 48b7eb9353
4 changed files with 78 additions and 2 deletions

View File

@@ -120,7 +120,7 @@ trait CartTrait
*/
protected function duplicateCart(EventDispatcherInterface $dispatcher, CartModel $cart, Session $session, Customer $customer = null)
{
$newCart = $cart->duplicate($this->generateCookie(), $customer);
$newCart = $cart->duplicate($this->generateCookie(), $customer, $dispatcher);
$session->setCart($newCart->getId());
$cartEvent = new CartEvent($newCart);