From 0c4a6aede970265c37d93ccc626d83edda41b5a4 Mon Sep 17 00:00:00 2001 From: vChabot Date: Mon, 3 Oct 2011 14:35:43 +0000 Subject: [PATCH] // guest checkout works with the 2 registration process --- controllers/front/AuthController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php index 248385de1..65483ed7d 100644 --- a/controllers/front/AuthController.php +++ b/controllers/front/AuthController.php @@ -314,7 +314,7 @@ class AuthControllerCore extends FrontController if (!Tools::getValue('phone') && !Tools::getValue('phone_mobile') && Configuration::get('PS_REGISTRATION_PROCESS_TYPE')) $this->errors[] = Tools::displayError('You must register at least one phone number'); $this->errors = array_unique(array_merge($this->errors, $customer->validateController())); - if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax) + if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount')) { if (!count($this->errors)) { @@ -449,7 +449,7 @@ class AuthControllerCore extends FrontController else { $address->id_customer = (int)$customer->id; - if ((Configuration::get('PS_REGISTRATION_PROCESS_TYPE') || $this->ajax) && !$address->add()) + if ((Configuration::get('PS_REGISTRATION_PROCESS_TYPE') || $this->ajax || Tools::isSubmit('submitGuestAccount')) && !$address->add()) $this->errors[] = Tools::displayError('An error occurred while creating your address.'); else { @@ -482,7 +482,7 @@ class AuthControllerCore extends FrontController die(Tools::jsonEncode($return)); } // if registration type is in two steps, we redirect to register address - if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax) + if (!Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && !$this->ajax && !Tools::isSubmit('submitGuestAccount')) Tools::redirect('index.php?controller=address'); if ($back = Tools::getValue('back')) Tools::redirect('index.php?controller='.$back);