I have modified signup.pdt ( /plugins/order/views/templates/wizard ) to display as below. I have removed the un-needed fields from view as they're not needed for our business. The trouble I am having is that removing fields, even those that are NOT "required" results in the inability to proceed with the registration process. The page simply does not progress to the next step, and I can not determine why, as I do not believe any relevant code has been snipped. I only want to display the absolute minimum amount of forms required to process an order.
The above is the ORIGINAL code, below is the modified code:
<divclass="col-md-12"><h4><?php $this->_('Signup.index.heading_contact');?></h4></div><divclass="col-md-6"><divclass="form-group"><?php
$this->Form->label($this->_('Signup.index.field_firstname',true),'first_name');
$this->Form->fieldText('first_name', $this->Html->ifSet($vars->first_name),['id'=>'first_name','class'=>'form-control','placeholder'=> $this->_('Signup.index.field_firstname',true)]);?></div><divclass="form-group"><?php
$this->Form->label($this->_('Signup.index.field_lastname',true),'last_name');
$this->Form->fieldText('last_name', $this->Html->ifSet($vars->last_name),['id'=>'last_name','class'=>'form-control','placeholder'=> $this->_('Signup.index.field_lastname',true)]);?></div><divclass="form-group"><?php
$this->Form->label($this->_('Signup.index.field_email',true),'email');
$this->Form->fieldText('email', $this->Html->ifSet($vars->email),['id'=>'email','class'=>'form-control','placeholder'=> $this->_('Signup.index.field_email',true)]);?></div></div><divclass="col-md-6"><strong>NOTICE!</strong><br/><ul><li>If paying with <i>crypto</i>, you may choose an alias with no ID verification.<br/>( <ahref="https://incog.host/tworandomwords"target="_blank">Here is our random two-word generator</a> )</li><li>If paying with PayPal or Credit Card we will need to verify your identify before setting up your account. This protects us from fraudulent orders. We will not store your personal identifying information about you (First/Last name, location information, etc) after verification.</li></ul><divclass="form-group"><?php
$this->Form->label($this->_('Signup.index.field_country',true),'country');
$this->Form->fieldSelect('country', $this->Html->ifSet($countries), $this->Html->ifSet($vars->country),['id'=>'country','class'=>'form-control']);?><ul><li>We are an American based company and must request your country of origin as we are forbidden from providing services to residents of: <i>Iran, Lebanon, Syria, Cuba, North Korea, Libya, Sudan, and Somalia.</i></li></ul></div></div><?php
if($this->Html->ifSet($custom_fields)&&!empty($custom_fields)){?><hr><divclass="col-md-12"><h4><?php $this->_('Signup.index.heading_settings');?></h4><?php
// Display custom client fieldsforeach($custom_fields as $field){?><divclass="form-group"><?php
// Set a unique field ID
$field_id = $this->Html->ifSet($custom_field_prefix). $this->Html->ifSet($field->id);// Show each custom field
$disabled =($this->Html->ifSet($field->read_only)=='1'?['disabled'=>'disabled']:[]);switch($field->type){case'text':
$this->Form->label($this->Html->ifSet($field->real_name), $field_id);
$this->Form->fieldText($field_id, $this->Html->ifSet($vars->{$field_id}, $this->Html->ifSet($field->default)), array_merge(['id'=>$field_id,'class'=>'form-control'], $disabled));break;case'select':
$this->Form->label($this->Html->ifSet($field->real_name), $field_id);
$this->Form->fieldSelect($field_id, $this->Html->ifSet($field->values,[]), $this->Html->ifSet($vars->{$field_id}, $this->Html->ifSet($field->default)), array_merge(['id'=>$field_id,'class'=>'form-control'], $disabled));break;case'textarea':
$this->Form->label($this->Html->ifSet($field->real_name), $field_id);
$this->Form->fieldTextarea($field_id, $this->Html->ifSet($vars->{$field_id}, $this->Html->ifSet($field->default)), array_merge(['id'=>$field_id,'class'=>'form-control'], $disabled));break;case'checkbox':?><divclass="checkbox"><label><?php $this->Form->fieldCheckbox($field_id, $this->Html->ifSet($field->values), $this->Html->ifSet($vars->{$field_id}, $this->Html->ifSet($field->default)), array_merge(['id'=>$field_id], $disabled));?><?php $this->Html->_($field->real_name);?></label></div><?php
break;}?></div><?php
}?></div><?php
}?><hr><divclass="col-md-6"><h4><?php $this->_('Signup.index.heading_authentication');?></h4><?php
if($this->Html->ifSet($force_email_usernames,'false')=='true'){
$this->Form->fieldHidden('username_type','email');
$this->Form->fieldHidden('username','');?><divclass="alert alert-info"><p><?php $this->_('Signup.!notice.force_email_usernames');?></p></div><?php
}else{?><divclass="radio"><label><?php
$this->Form->fieldRadio('username_type','email',($this->Html->ifSet($vars->username_type,'email')=='email'),['id'=>'username_type_email']);
$this->_('Signup.index.field_username_type_email');?></label></div><divclass="radio"><label><?php
$this->Form->fieldRadio('username_type','username',($this->Html->ifSet($vars->username_type)=='username'),['id'=>'username_type_username']);
$this->_('Signup.index.field_username_type_username');?></label></div><divclass="form-group username"><?php
$this->Form->label($this->_('Signup.index.field_username',true),'signup_username');
$this->Form->fieldText('username', $this->Html->ifSet($vars->username),['id'=>'signup_username','class'=>'form-control','placeholder'=> $this->_('Signup.index.field_username',true)]);?></div><?php
}?><divclass="form-group"><?php
$this->Form->label($this->_('Signup.index.field_newpassword',true),'new_password');
$this->Form->fieldPassword('new_password',['id'=>'new_password','class'=>'form-control','placeholder'=> $this->_('Signup.index.field_newpassword',true)]);?></div><divclass="form-group"><?php
$this->Form->label($this->_('Signup.index.field_confirmpassword',true),'confirm_password');
$this->Form->fieldPassword('confirm_password',['id'=>'confirm_password','class'=>'form-control','placeholder'=> $this->_('Signup.index.field_confirmpassword',true)]);?></div><?php
if($this->Html->ifSet($show_receive_email_marketing)=='true'){?></div><divclass="col-md-12"><divclass="form-group well"><?php $this->Form->fieldCheckbox('receive_email_marketing','true', $this->Html->ifSet($vars->receive_email_marketing,'false')=='true',['id'=>'receive_email_marketing']);?><?php $this->Form->label($this->_('Signup.index.field_receive_email_marketing',true),'receive_email_marketing',['class'=>'inline']);?></div><?php
}?></div>
Is there any particular forms that have to be displayed in order for the information in the others to get processed?
For example, if I wanted to remove the company, title, and address 1 and address 2 forms I'd snip this, but doing so means that clicking "Create Account" does nothing but verify the CAPTCHA (if incorrect, you get warning. If correct, the page reloads and the button to "Create Account" is no longer clickable.
I know this may beyond the traditional support given here but I don't want to display registration fields that I don't need. First, Last, and Email are the only hard-coded required fields and those forms have not changed.
Question
Incog
I have modified signup.pdt ( /plugins/order/views/templates/wizard ) to display as below. I have removed the un-needed fields from view as they're not needed for our business. The trouble I am having is that removing fields, even those that are NOT "required" results in the inability to proceed with the registration process. The page simply does not progress to the next step, and I can not determine why, as I do not believe any relevant code has been snipped. I only want to display the absolute minimum amount of forms required to process an order.
I have CHANGED this ORIGINAL section:
The above is the ORIGINAL code, below is the modified code:
Is there any particular forms that have to be displayed in order for the information in the others to get processed?
For example, if I wanted to remove the company, title, and address 1 and address 2 forms I'd snip this, but doing so means that clicking "Create Account" does nothing but verify the CAPTCHA (if incorrect, you get warning. If correct, the page reloads and the button to "Create Account" is no longer clickable.
I know this may beyond the traditional support given here but I don't want to display registration fields that I don't need. First, Last, and Email are the only hard-coded required fields and those forms have not changed.
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.