jaimemm Posted April 24, 2011 Share Posted April 24, 2011 When trying to modify an address linked to a guest account in the backend, it raises an error saying something like it's not registered.Is this happening to anyone? Link to comment Share on other sites More sharing options...
tomerg3 Posted April 24, 2011 Share Posted April 24, 2011 What version of PS are you using?What is the exact error? Link to comment Share on other sites More sharing options...
jaimemm Posted April 25, 2011 Author Share Posted April 25, 2011 Version 1.4.0.17When trying to modify it from the frontend, the error shown:"Address1 required", it looks like it doesn't recognize the submit of the address fields, only the user details.When trying to modify from the backend, the error shown:"That email is not registered"Cheers Link to comment Share on other sites More sharing options...
tomerg3 Posted April 25, 2011 Share Posted April 25, 2011 was this a clean install, or an upgrade from a previous version? Link to comment Share on other sites More sharing options...
jaimemm Posted April 26, 2011 Author Share Posted April 26, 2011 100% clean Link to comment Share on other sites More sharing options...
jaimemm Posted April 26, 2011 Author Share Posted April 26, 2011 In the backend, I've found the problem:- admin/tabs/AdminAddresses.phpMethod postProcess==========================================if (isset($_POST['submitAdd'.$this->table])) { // Transform e-mail in id_customer for parent processing if ($this->addressType == 'customer') { if (Validate::isEmail(Tools::getValue('email'))) { $customer = new Customer; $customer = $customer->getByemail(Tools::getValue('email')); if (Validate::isLoadedObject($customer))==========================================It will always fail for a GUEST account in the line "if (Validate::isLoadedObject($customer))", because of:- classes/Customer.phpMethod getByEmail:========================================== $result = Db::getInstance()->getRow(' SELECT * FROM `'._DB_PREFIX_ .'customer` WHERE `active` = 1 AND `email` = \''.pSQL($email).'\' '.(isset($passwd) ? 'AND `passwd` = \''.md5(pSQL(_COOKIE_KEY_.$passwd)).'\'' : '').' AND `deleted` = 0 AND `is_guest` = 0'); if (!$result) return false; $this->id = $result['id_customer']; foreach ($result AS $key => $value) if (key_exists($key, $this)) $this->{$key} = $value; return $this;==========================================This SQL will never return an email of a GUEST account. Link to comment Share on other sites More sharing options...
peter_m Posted January 30, 2012 Share Posted January 30, 2012 is a solution to this problem? Link to comment Share on other sites More sharing options...
Christiaan_01 Posted August 21, 2013 Share Posted August 21, 2013 I have the same problem. Using PS 1.5.2. Error message: this email address isn't registered. Somebody knows the fix? Link to comment Share on other sites More sharing options...
Recommended Posts