From 5d024dd47a8d8fa70f931025c8a451939d04a6f7 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Thu, 29 Sep 2011 09:01:59 +0000 Subject: [PATCH] //PreProcess => PostProcess --- controllers/front/OrderFollowController.php | 15 +++++++++++++-- controllers/front/PasswordController.php | 4 ++-- controllers/front/ProductController.php | 9 +-------- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/controllers/front/OrderFollowController.php b/controllers/front/OrderFollowController.php index d2c98c1a8..fa19653ec 100644 --- a/controllers/front/OrderFollowController.php +++ b/controllers/front/OrderFollowController.php @@ -32,7 +32,11 @@ class OrderFollowControllerCore extends FrontController public $authRedirection = 'order-follow'; public $ssl = true; - public function process() + /** + * Start forms process + * @see FrontController::postProcess() + */ + public function postProcess() { if (Tools::isSubmit('submitReturnMerchandise')) { @@ -66,7 +70,14 @@ class OrderFollowControllerCore extends FrontController Module::hookExec('orderReturn', array('orderReturn' => $orderReturn)); Tools::redirect('index.php?controller=order-follow'); } - + } + + /** + * Assign template vars related to page content + * @see FrontController::process() + */ + public function process() + { $ordersReturn = OrderReturn::getOrdersReturn($this->context->customer->id); if (Tools::isSubmit('errorQuantity')) $this->context->smarty->assign('errorQuantity', true); diff --git a/controllers/front/PasswordController.php b/controllers/front/PasswordController.php index 42e966361..c1a2c4793 100644 --- a/controllers/front/PasswordController.php +++ b/controllers/front/PasswordController.php @@ -33,9 +33,9 @@ class PasswordControllerCore extends FrontController /** * Start forms process - * @see FrontController::preProcess() + * @see FrontController::postProcess() */ - public function preProcess() + public function postProcess() { if (Tools::isSubmit('email')) { diff --git a/controllers/front/ProductController.php b/controllers/front/ProductController.php index 9e6eb75b3..4c303ed4a 100644 --- a/controllers/front/ProductController.php +++ b/controllers/front/ProductController.php @@ -79,14 +79,7 @@ class ProductControllerCore extends FrontController $this->product->quantity = 0; $this->product->description = $this->transformDescriptionWithImg($this->product->description); - } - - /** - * Start forms process - * @see FrontController::preProcess() - */ - public function preProcess() - { + if (!Validate::isLoadedObject($this->product)) $this->errors[] = Tools::displayError('Product not found'); else