Permalink
Browse files

update CartEvents consts

  • Loading branch information...
1 parent 0a87311 commit 31fcf00775e9c33a66d10ad99503f838ac340d43 @iampersistent iampersistent committed Aug 3, 2012
Showing with 37 additions and 4 deletions.
  1. +37 −4 lib/Vespolina/Entity/Order/CartEvents.php
@@ -11,9 +11,14 @@
final class CartEvents
{
/**
- * The cart initialization cart is fired after a new cart is created and initialized
+ * The cart initialization cart is is triggered after a new cart is created and initialized
*/
- const INIT = 'vespolina_cart.cart_init';
+ const INIT_CART = 'vespolina_cart.cart_init';
+
+ /**
+ * INIT_ITEM is triggered when an product is added to the cart
+ */
+ const INIT_ITEM = 'vespolina_cart.item_init';
/**
* After a pricing context has been created, following event is called to initialize the pricing context.
@@ -27,8 +32,36 @@
/**
* The cart finished event is triggered when all basic operations on a cart have been completed
* For instance one first adds three items, adjust quantity and then triggers the cart finished event
- *
- * @var string
*/
const FINISHED = 'vespolina_cart.cart_finished';
+
+ /**
+ * REMOVE_ITEM is triggered a product has been completely removed from a cart
+ */
+ const REMOVE_ITEM = 'vespolina_cart.item_remove';
+
+ /**
+ * UPDATE_CART is triggered to alert that an update to the cart is needed
+ */
+ const UPDATE_CART = 'vespolina_cart.cart_update';
+
+ /**
+ * UPDATE_CART_PRICE is triggered to alert that the prices in the cart are needed
+ */
+ const UPDATE_CART_PRICE = 'vespolina_cart.cart_update_price';
+
+ /**
+ * UPDATE_CART_STATE is triggered when the state of the cart has changed
+ */
+ const UPDATE_CART_STATE = 'vespolina_cart.cart_update_state';
+
+ /**
+ * UPDATE_ITEM is triggered when the a quantity or options in a item as changed
+ */
+ const UPDATE_ITEM = 'vespolina_cart.item_update';
+
+ /**
+ * UPDATE_ITEM_STATE is triggered when the state of an item in the cart has changed
+ */
+ const UPDATE_ITEM_STATE = 'vespolina_cart.item_update_state';
}

0 comments on commit 31fcf00

Please sign in to comment.