dispatch event when cart is duplicated

This commit is contained in:
Manuel Raynaud
2013-08-02 16:01:21 +02:00
parent fe850718cc
commit 9995daa158
5 changed files with 23 additions and 33 deletions

View File

@@ -29,30 +29,13 @@ use Thelia\Model\Cart;
class CartEvent extends InternalEvent {
protected $cart;
protected $modified;
public $cart;
public function __construct(Cart $cart)
{
$this->cart = $cart;
$this->modified = false;
}
public function setCart(Cart $cart)
{
$this->cart = $cart;
$this->modified = true;
}
public function getCart()
{
return $this->cart;
}
public function isModified()
{
return $this->modified;
}
}

View File

@@ -88,4 +88,9 @@ final class TheliaEvents
* Sent before customer insertion, to allow modules to create a custom customer reference.
*/
const CREATECUSTOMER_CUSTOMREF = "customer.creation.customref";
/**
* sent when a new existing cat id duplicated. This append when current customer is different from current cart
*/
const CART_DUPLICATE = "cart.duplicate";
}