WIP
- Coupon Controller
This commit is contained in:
@@ -256,4 +256,16 @@ class CategoryController extends BaseAdminController
|
||||
// We did not recognized the action -> return a 404 page
|
||||
return $this->pageNotFound();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a Category from its parent id
|
||||
*
|
||||
* @return mixed|\Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function getByParentIdAction($parentId, $_format = 'json')
|
||||
{
|
||||
if (null !== $response = $this->checkAuth("admin.catalog.view")) return $response;
|
||||
|
||||
return $this->render('categories', $args);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,9 +77,12 @@ class CouponController extends BaseAdminController
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
protected function createCoupon($args)
|
||||
protected function createAction($args)
|
||||
{
|
||||
$this->checkAuth("ADMIN", "admin.coupon.view");
|
||||
// Check current user authorization
|
||||
if (null !== $response = $this->checkAuth("admin.coupon.create")) return $response;
|
||||
|
||||
$message = false;
|
||||
|
||||
if ($this->getRequest()->isMethod('POST')) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user