From 2adb0ed5b778d3d1c38bc92a5c0714495a35e429 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 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8983 b9a71923-0436-4b27-9f14-aed3839534dd --- 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);