diff --git a/core/lib/Thelia/Controller/Admin/CategoryController.php b/core/lib/Thelia/Controller/Admin/CategoryController.php index ad5b2bd36..c4604c990 100644 --- a/core/lib/Thelia/Controller/Admin/CategoryController.php +++ b/core/lib/Thelia/Controller/Admin/CategoryController.php @@ -169,7 +169,8 @@ class CategoryController extends AbstractSeoCrudController return array( 'category_id' => $this->getRequest()->get('category_id', 0), 'folder_id' => $this->getRequest()->get('folder_id', 0), - 'current_tab' => $this->getRequest()->get('current_tab', 'general') + 'current_tab' => $this->getRequest()->get('current_tab', 'general'), + 'page' => $this->getRequest()->get('page', 1) ); } @@ -182,14 +183,17 @@ class CategoryController extends AbstractSeoCrudController array( 'category_order' => $currentOrder, 'product_order' => $product_order, - 'category_id' => $this->getRequest()->get('category_id', 0) + 'category_id' => $this->getRequest()->get('category_id', 0), + 'page' => $this->getRequest()->get('page', 1) )); } protected function redirectToListTemplate() { - $category_id = $this->getRequest()->get('category_id', 0); - $this->redirectToListTemplateWithId($category_id); + $this->redirectToRoute('admin.categories', array( + 'category_id' => $this->getRequest()->get('category_id', 0), + 'page' => $this->getRequest()->get('page', 1)) + ); } protected function redirectToListTemplateWithId($category_id) diff --git a/core/lib/Thelia/Controller/Admin/ProductController.php b/core/lib/Thelia/Controller/Admin/ProductController.php index f4bfb095f..4cbfbad42 100644 --- a/core/lib/Thelia/Controller/Admin/ProductController.php +++ b/core/lib/Thelia/Controller/Admin/ProductController.php @@ -361,7 +361,8 @@ class ProductController extends AbstractSeoCrudController 'product_id' => $this->getRequest()->get('product_id', 0), 'folder_id' => $this->getRequest()->get('folder_id', 0), 'accessory_category_id' => $this->getRequest()->get('accessory_category_id', 0), - 'current_tab' => $this->getRequest()->get('current_tab', 'general') + 'current_tab' => $this->getRequest()->get('current_tab', 'general'), + 'page' => $this->getRequest()->get('page', 1) ); } @@ -386,7 +387,8 @@ class ProductController extends AbstractSeoCrudController return $this->render('categories', array( 'product_order' => $currentOrder, - 'category_id' => $this->getCategoryId() + 'category_id' => $this->getCategoryId(), + 'page' => $this->getRequest()->get('page', 1) )); } @@ -394,7 +396,10 @@ class ProductController extends AbstractSeoCrudController { $this->redirectToRoute( 'admin.products.default', - array('category_id' => $this->getCategoryId()) + array( + 'category_id' => $this->getCategoryId(), + 'page' => $this->getRequest()->get('page', 1) + ) ); } @@ -438,18 +443,6 @@ class ProductController extends AbstractSeoCrudController ); } - protected function performAdditionalUpdateAction($updateEvent) - { - if ($this->getRequest()->get('save_mode') != 'stay') { - - // Redirect to parent product list - $this->redirectToRoute( - 'admin.categories.default', - array('category_id' => $this->getCategoryId()) - ); - } - } - protected function performAdditionalUpdatePositionAction($positionEvent) { // Redirect to parent product list diff --git a/templates/backOffice/default/categories.html b/templates/backOffice/default/categories.html index 5239efaa4..af5f4897f 100644 --- a/templates/backOffice/default/categories.html +++ b/templates/backOffice/default/categories.html @@ -270,20 +270,20 @@
- {loop name="product_list" type="product" visible="*" category_default=$category_id order=$product_order} + {loop name="product_list" type="product" visible="*" category_default=$category_id order=$product_order page=$page limit=#max_displayed_products#}