Skip to main content

Registration fields order

8 years 3 months ago #295991 by idimarco
-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.8.7
-- PHP version -- : 7.0.3

Hi

How to move the Terms and Privacy boxes at the bottom of the registration form?
Please note that Terms and Privacy boxes have been created as USER custom fields (see printscreen).

How to align the check box line "Tick the box to receive our ads (optional)" ?

Thanks in advance
Imma

Please Log in or Create an account to join the conversation.

8 years 3 months ago #296034 by nicolas
Replied by nicolas on topic Registration fields order
Hi,

You'll have to edit the file "sub_block_login_registration.php" via the menu Display->Views and move the piece:
Code:
// Custom fields $type = 'user'; if(!empty($this->extraFields[$type])) { foreach($this->extraFields[$type] as $fieldName => $field) { ?> <div class="hkform-group control-group hikashop_registration_<?php echo $fieldName;?>_line" id="hikashop_<?php echo $type . '_' . $this->step . '_' . $this->module_position . '_' . $field->field_namekey; ?>"> <?php $classname = $labelcolumnclass.' hkcontrol-label'; echo $this->fieldsClass->getFieldName($field, true, $classname); ?> <div class="<?php echo $inputcolumnclass;?>"> <?php $onWhat = ($field->field_type == 'radio') ? 'onclick' : 'onchange'; echo $this->fieldsClass->display( $field, @$this->$type->$fieldName, 'data['.$type.']['.$fieldName.']', false, ' class="hkform-control" '.$onWhat.'="hikashopToggleFields(this.value,\''.$fieldName.'\',\''.$type . '_' . $this->step . '_' . $this->module_position.'\',0,\'hikashop_\');"', false, $this->extraFields[$type], @$this->$type, false ); ?> </div> </div> <?php } }
after the piece:
Code:
if(!empty($this->options['address_on_registration']) && !empty($this->extraFields['address'])) { $type = 'address'; ?> <div class=""> <legend><?php echo JText::_( 'ADDRESS_INFORMATION' ); ?></legend> </div> <?php foreach($this->extraFields[$type] as $fieldName => $oneExtraField) { // $oneExtraField->registration_page = @$this->registration_page; ?> <div class="hkform-group control-group hikashop_registration_<?php echo $fieldName;?>_line" id="hikashop_<?php echo $type . '_' . $this->step . '_' . $this->module_position . '_' . $oneExtraField->field_namekey; ?>"> <?php $classname = $labelcolumnclass.' hkcontrol-label'; // if($oneExtraField->field_required) // $classname .= ' required'; echo $this->fieldsClass->getFieldName($oneExtraField, true, $classname); ?> <div class="<?php echo $inputcolumnclass;?>"> <?php $onWhat = ($oneExtraField->field_type == 'radio') ? 'onclick' : 'onchange'; echo $this->fieldsClass->display( $oneExtraField, @$this->$type->$fieldName, 'data['.$type.']['.$fieldName.']', false, 'class="hkform-control" '.$onWhat.'="window.hikashop.toggleField(this.value,\''.$fieldName.'\',\''.$type . '_' . $this->step . '_' . $this->module_position.'\',0,\'hikashop_\');"', false, $this->extraFields[$type], @$this->$type, false ); ?> </div> </div> <?php } if(!empty($this->options['same_address'])) { ?> <div class="hkform-group control-group hikashop_registration_same_address_line" id="hikashop_address_<?php echo $this->step . '_' . $this->module_position . '_same_address'; ?>"> <div class="<?php echo $labelcolumnclass;?> hkcontrol-label"></div> <div class="<?php echo $inputcolumnclass;?>"> <input class="hikashop_checkout_same_address_checkbox" id="hikashop_address_<?php echo $this->step . '_' . $this->module_position . '_same_address_input'; ?>" type="checkbox" name="data[same_address]" value="1"/> <label for="hikashop_address_<?php echo $this->step . '_' . $this->module_position . '_same_address_input'; ?>"><?php echo JText::_('SAME_FOR_SHIPPING'); ?></label> </div> </div> <?php } }

Please Log in or Create an account to join the conversation.

8 years 3 months ago #296096 by idimarco
Replied by idimarco on topic Registration fields order
Thanks a lot. It works fine for the registration form which is desplayed during the checkout.
However, regarding the registration form desplayed once I click on the button “register” ( user/form php), I still see 2 different user/custom_fields.php sections: one dedicated to checkboxes for Privacy and Terms which is desplayed before the one dedicated to telephone field and checkbox for newsletter (from AcyMailing).

I would like to move checkboxes for Privacy and Terms at the bottom of the registration form. How to do that?
Thanks in advance.

Please Log in or Create an account to join the conversation.

8 years 3 months ago #296103 by nicolas
Replied by nicolas on topic Registration fields order
Hi,

For the registration form page, it's indeed in another view file.
You need to edit the file "registration" of the view "user" and swap:
Code:
$this->type = 'user';
and:
Code:
$this->type = 'address';

Please Log in or Create an account to join the conversation.

8 years 3 months ago #296136 by idimarco
Replied by idimarco on topic Registration fields order
Thanks a lot!

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum