change action name for change item article

This commit is contained in:
Manuel Raynaud
2013-08-13 10:12:04 +02:00
parent cf5ccdc7ae
commit 3bf7e79960
4 changed files with 8 additions and 4 deletions

View File

@@ -180,7 +180,7 @@ class Cart extends BaseAction implements EventSubscriberInterface
return array(
"action.addArticle" => array("addArticle", 128),
"action.deleteArticle" => array("deleteArticle", 128),
"action.modifyArticle" => array("modifyArticle", 128),
"action.changeArticle" => array("modifyArticle", 128),
);
}

View File

@@ -17,4 +17,8 @@
<route id="cart.add.process" path="/cart/add" methods="post">
<default key="_controller">Thelia\Controller\Front\CartController::addArticle</default>
</route>
<route id="cart.change.process" path="/cart/change" methods="post">
<default key="_controller">Thelia\Controller\Front\CartController::addArticle</default>
</route>
</routes>

View File

@@ -41,7 +41,7 @@ class CartController extends BaseFrontController
{
$cartEvent = $this->getCartEvent();
$this->dispatch(TheliaEvents::CART_MODIFYARTICLE, $cartEvent);
$this->dispatch(TheliaEvents::CART_CHANGEARTICLE, $cartEvent);
}
protected function getCartEvent()

View File

@@ -126,7 +126,7 @@ final class TheliaEvents
/**
* sent when a cart item is modify
*/
const AFTER_CARTMODIFYITEM = "cart.modifyItem";
const AFTER_CARTCHANGEITEM = "cart.modifyItem";
/**
* sent for addArticle action
@@ -136,5 +136,5 @@ final class TheliaEvents
/**
* sent on modify article action
*/
const CART_MODIFYARTICLE = "action.modifyArticle";
const CART_CHANGEARTICLE = "action.changeArticle";
}