protected function wizardAddAddress()
    {
        $types = $this->address->getTypes();
        $this->validateMenu('type', $this->text('Address type'), 'address', array_combine($types, $types), 'shipping');

        $this->validatePrompt('user_id', $this->text('User ID'), 'address');
        $this->validatePrompt('country', $this->text('Country code'), 'address');
        $this->validatePrompt('state_id', $this->text('Country state ID'), 'address');
        $this->validatePrompt('city_id', $this->text('City ID'), 'address');
        $this->validatePrompt('address_1', $this->text('Address'), 'address');
        $this->validatePrompt('address_2', $this->text('Additional address'), 'address');
        $this->validatePrompt('phone', $this->text('Phone'), 'address');
        $this->validatePrompt('postcode', $this->text('Post code/ZIP'), 'address');
        $this->validatePrompt('company', $this->text('Company'), 'address');
        $this->validatePrompt('fax', $this->text('Fax'), 'address');
        $this->validatePrompt('first_name', $this->text('First name'), 'address');
        $this->validatePrompt('middle_name', $this->text('Middle name'), 'address');
        $this->validatePrompt('last_name', $this->text('Last name'), 'address');
        $this->validatePrompt('data', $this->text('Data'), 'address');

        $this->setSubmittedJson('data');
        $this->validateComponent('address');
        $this->addAddress();
    }
protected function wizardAddAddress()
    {
        $types = $this->address->getTypes();
        $this->validateMenu('type', $this->text('Address type'), 'address', array_combine($types, $types), 'shipping');

        $this->validatePrompt('user_id', $this->text('User ID'), 'address');
        $this->validatePrompt('country', $this->text('Country code'), 'address');
        $this->validatePrompt('state_id', $this->text('Country state ID'), 'address');
        $this->validatePrompt('city_id', $this->text('City ID'), 'address');
        $this->validatePrompt('address_1', $this->text('Address'), 'address');
        $this->validatePrompt('address_2', $this->text('Additional address'), 'address');
        $this->validatePrompt('phone', $this->text('Phone'), 'address');
        $this->validatePrompt('postcode', $this->text('Post code/ZIP'), 'address');
        $this->validatePrompt('company', $this->text('Company'), 'address');
        $this->validatePrompt('fax', $this->text('Fax'), 'address');
        $this->validatePrompt('first_name', $this->text('First name'), 'address');
        $this->validatePrompt('middle_name', $this->text('Middle name'), 'address');
        $this->validatePrompt('last_name', $this->text('Last name'), 'address');
        $this->validatePrompt('data', $this->text('Data'), 'address');

        $this->setSubmittedJson('data');
        $this->validateComponent('address');
        $this->addAddress();
    }
protected function wizardAddAddress ( ) { $ types = $ this -> address -> getTypes ( ) ; $ this -> validateMenu ( 'type' , $ this -> text ( 'Address type' ) , 'address' , array_combine ( $ types , $ types ) , 'shipping' ) ; $ this -> validatePrompt ( 'user_id' , $ this -> text ( 'User ID' ) , 'address' ) ; $ this -> validatePrompt ( 'country' , $ this -> text ( 'Country code' ) , 'address' ) ; $ this -> validatePrompt ( 'state_id' , $ this -> text ( 'Country state ID' ) , 'address' ) ; $ this -> validatePrompt ( 'city_id' , $ this -> text ( 'City ID' ) , 'address' ) ; $ this -> validatePrompt ( 'address_1' , $ this -> text ( 'Address' ) , 'address' ) ; $ this -> validatePrompt ( 'address_2' , $ this -> text ( 'Additional address' ) , 'address' ) ; $ this -> validatePrompt ( 'phone' , $ this -> text ( 'Phone' ) , 'address' ) ; $ this -> validatePrompt ( 'postcode' , $ this -> text ( 'Post code/ZIP' ) , 'address' ) ; $ this -> validatePrompt ( 'company' , $ this -> text ( 'Company' ) , 'address' ) ; $ this -> validatePrompt ( 'fax' , $ this -> text ( 'Fax' ) , 'address' ) ; $ this -> validatePrompt ( 'first_name' , $ this -> text ( 'First name' ) , 'address' ) ; $ this -> validatePrompt ( 'middle_name' , $ this -> text ( 'Middle name' ) , 'address' ) ; $ this -> validatePrompt ( 'last_name' , $ this -> text ( 'Last name' ) , 'address' ) ; $ this -> validatePrompt ( 'data' , $ this -> text ( 'Data' ) , 'address' ) ; $ this -> setSubmittedJson ( 'data' ) ; $ this -> validateComponent ( 'address' ) ; $ this -> addAddress ( ) ; }
Add a new address step by step
Add a new address step by step