Amazzing Posted September 21, 2013 Share Posted September 21, 2013 (edited) Hello, I have a strange issue, about lastname and name fields in one page guaest checkout. As you know, after filling in customer_firstname and customer_lastname, same values are automatically transferred to firstname and lastname in delivery address. If you just click save, after there values are filled in, everything works fine. If you decide to change first/lastname in delivery address, and type a correct name, everything works fine too. But if you leave first/lastname empty, or you include any numbers in it and click save, a technical error appears: "upable to save addresses": It looks like these fields get validated, but in case, they didn't pass validation, error message is not icluded in regular error window, and technical error is returned. If there is something wrong about validation of other fields, a regular error block appears (for example: here is 1 Error(s): 1. ... is required.) What could be the reason for that? And what would you suggest as a fix for that bug? PS 1.5.5.0 Edited September 21, 2013 by Amazzing (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted September 21, 2013 Share Posted September 21, 2013 is there any chance to check your website? it's hard to say what's going on without an access to it Link to comment Share on other sites More sharing options...
vekia Posted September 21, 2013 Share Posted September 21, 2013 i created order in your store and there is no error related to "customer account creation" form Link to comment Share on other sites More sharing options...
Amazzing Posted September 21, 2013 Author Share Posted September 21, 2013 Have you tried to leave lastname empty, while customer_lastname was filled in? Link to comment Share on other sites More sharing options...
vekia Posted September 21, 2013 Share Posted September 21, 2013 can you try with this: open classes/Customer.php there is a object definition: public static $definition = array( 'table' => 'address', 'primary' => 'id_address', 'fields' => array( 'id_customer' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), 'id_manufacturer' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), 'id_supplier' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), 'id_warehouse' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId', 'copy_post' => false), 'id_country' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'id_state' => array('type' => self::TYPE_INT, 'validate' => 'isNullOrUnsignedId'), 'alias' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 32), 'company' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 64), 'lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), 'firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), 'vat_number' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), 'address1' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'required' => true, 'size' => 128), 'address2' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'size' => 128), 'postcode' => array('type' => self::TYPE_STRING, 'validate' => 'isPostCode', 'size' => 12), 'city' => array('type' => self::TYPE_STRING, 'validate' => 'isCityName', 'required' => true, 'size' => 64), 'other' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage', 'size' => 300), 'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32), 'phone_mobile' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32), 'dni' => array('type' => self::TYPE_STRING, 'validate' => 'isDniLite', 'size' => 16), 'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'copy_post' => false), 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'copy_post' => false), ), ); remove 'required' => true, param from these fields, do the same in classes/Address.php Link to comment Share on other sites More sharing options...
Amazzing Posted September 21, 2013 Author Share Posted September 21, 2013 Well, I have removed 'required' => true, as you said, but in this case both customer_first/lastname and first/lastname are not required anymore. So, an order can be placed without indicating first/last name. However I need these fields to be required. Just, instead of returning technical error, I want a regular error to be displayed as for the other fields. Link to comment Share on other sites More sharing options...
Amazzing Posted September 21, 2013 Author Share Posted September 21, 2013 (edited) the good news is that after this modification, in case lastname is in wrong format it doesnt return technical error alert, but returns a regular error block Edited September 21, 2013 by Amazzing (see edit history) Link to comment Share on other sites More sharing options...
tozi Posted January 15, 2014 Share Posted January 15, 2014 it is solved? i have the same problem my web http://horeka-shop.cz/ Link to comment Share on other sites More sharing options...
vekia Posted January 16, 2014 Share Posted January 16, 2014 it is solved? i have the same problem my web http://horeka-shop.cz/ i replied in your topic, please continue discussion there Link to comment Share on other sites More sharing options...
Recommended Posts