Added the COUPON_CLEAR_ALL event, and a route to trigger it.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user