change action name for change item article
This commit is contained in:
@@ -180,7 +180,7 @@ class Cart extends BaseAction implements EventSubscriberInterface
|
|||||||
return array(
|
return array(
|
||||||
"action.addArticle" => array("addArticle", 128),
|
"action.addArticle" => array("addArticle", 128),
|
||||||
"action.deleteArticle" => array("deleteArticle", 128),
|
"action.deleteArticle" => array("deleteArticle", 128),
|
||||||
"action.modifyArticle" => array("modifyArticle", 128),
|
"action.changeArticle" => array("modifyArticle", 128),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,4 +17,8 @@
|
|||||||
<route id="cart.add.process" path="/cart/add" methods="post">
|
<route id="cart.add.process" path="/cart/add" methods="post">
|
||||||
<default key="_controller">Thelia\Controller\Front\CartController::addArticle</default>
|
<default key="_controller">Thelia\Controller\Front\CartController::addArticle</default>
|
||||||
</route>
|
</route>
|
||||||
|
|
||||||
|
<route id="cart.change.process" path="/cart/change" methods="post">
|
||||||
|
<default key="_controller">Thelia\Controller\Front\CartController::addArticle</default>
|
||||||
|
</route>
|
||||||
</routes>
|
</routes>
|
||||||
@@ -41,7 +41,7 @@ class CartController extends BaseFrontController
|
|||||||
{
|
{
|
||||||
$cartEvent = $this->getCartEvent();
|
$cartEvent = $this->getCartEvent();
|
||||||
|
|
||||||
$this->dispatch(TheliaEvents::CART_MODIFYARTICLE, $cartEvent);
|
$this->dispatch(TheliaEvents::CART_CHANGEARTICLE, $cartEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getCartEvent()
|
protected function getCartEvent()
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ final class TheliaEvents
|
|||||||
/**
|
/**
|
||||||
* sent when a cart item is modify
|
* sent when a cart item is modify
|
||||||
*/
|
*/
|
||||||
const AFTER_CARTMODIFYITEM = "cart.modifyItem";
|
const AFTER_CARTCHANGEITEM = "cart.modifyItem";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sent for addArticle action
|
* sent for addArticle action
|
||||||
@@ -136,5 +136,5 @@ final class TheliaEvents
|
|||||||
/**
|
/**
|
||||||
* sent on modify article action
|
* sent on modify article action
|
||||||
*/
|
*/
|
||||||
const CART_MODIFYARTICLE = "action.modifyArticle";
|
const CART_CHANGEARTICLE = "action.changeArticle";
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user