Added the COUPON_CLEAR_ALL event, and a route to trigger it.

This commit is contained in:
Franck Allimant
2014-06-12 16:39:27 +02:00
parent 95841809c4
commit 96ebcf1880
4 changed files with 45 additions and 16 deletions

View File

@@ -160,6 +160,11 @@
<default key="_view">order-invoice</default>
</route>
<route id="order.coupon.clear" path="/order/clear-coupons">
<default key="_controller">Front\Controller\CouponController::clearAllCouponsAction</default>
<default key="_view">order-invoice</default>
</route>
<route id="order.payment.process" path="/order/pay">
<default key="_controller">Front\Controller\OrderController::pay</default>
</route>

View File

@@ -40,9 +40,16 @@ use Thelia\Module\Exception\DeliveryException;
*/
class CouponController extends BaseFrontController
{
/**
* Clear all coupons.
*/
public function clearAllCouponsAction() {
// Dispatch Event to the Action
$this->getDispatcher()->dispatch(TheliaEvents::COUPON_CLEAR_ALL);
}
/**
* Test Coupon consuming
* Coupon consuming
*/
public function consumeAction()
{