dispatch event when cart is duplicated
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
Reference in New Issue
Block a user