Fields order in Registration form

  • Posts: 80
  • Thank you received: 0
5 years 10 months ago #293234

-- url of the page with the problem -- : www.mangialarossa.com/index.php/hikashop...module-123/user/form
-- HikaShop version -- : 3.4.0
-- Joomla version -- : oomla! 3.8.7 Stable
-- PHP version -- : 7.0.27

Hi,

I would like to have the opt-in box related to Terms and Privacy from the top to the bottom of the form (after the field "Tick the box to receive our ads (optional)".
How can I do that?
I tried to change via "/html/com_hikashop/user/registration.php" in template "shaper_helix3" but I do not see how.

Here is the link to the registration page: www.mangialarossa.com/index.php/hikashop...module-123/user/form

Thanks in advance.
Imma

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

  • Posts: 81504
  • Thank you received: 13062
  • MODERATOR
5 years 10 months ago #293249

Hi,

The link doesn't work so I'm not sure what you want to change exactly:
monosnap.com/file/frIHGDey76UCUt5IMCpDbPF25H5FZq
Could you make it so we can look at the page in order to better understand the situation ?

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

  • Posts: 80
  • Thank you received: 0
5 years 10 months ago #293283

Hi Nicolas,
The link is active now.
Thanks in advance for your help.
Imma

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

  • Posts: 4508
  • Thank you received: 610
  • MODERATOR
5 years 10 months ago #293295

Hello,

Did you try to use the order to reorganize your field organisation ? in Display dropdown => Custom fields



That may allow you to display in required order your Address custom fields.
Hope this will help you.

Regards

Last edit: 5 years 10 months ago by Philip.

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

  • Posts: 80
  • Thank you received: 0
5 years 10 months ago #293301

Terms and Conditions is not address custom field but user custom field. Order can be modified only for address custom fields.

How to change position for user custom fields?

In addition, in front end, address custom fields are not aligned to email field and others coming from HikaShop HikaShop check out configuration. How to align?
Thanks

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

  • Posts: 81504
  • Thank you received: 13062
  • MODERATOR
5 years 10 months ago #293305

Hi,

The alignment issue is because you have some view overrides. Thus some of the view files on that page uses the old code from Hikashop 2 and some uses the new code and that creates this display issue.
You should enable the "Display view files" setting of the HikaShop configuration to see which view file it used there and then in the menu Display>Views, you can check them and remove the overrides. Then, you can reapply your modifications to the new version of the view file.
If you want to move the block displaying the custom user fields on the registration form, you want to edit the file "registration" of the view "user" via the menu Display>Views and move that code:

$this->setLayout('custom_fields');
	$this->type = 'user';
	echo $this->loadTemplate();

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

  • Posts: 80
  • Thank you received: 0
5 years 10 months ago #293389

Hi Nicolas,
remove the overrides and now fields alignment is fine. However, I still have 2 blocks of user/custom fields in my template which I would like to switch position (the block for First name, Last name* and Telephone* should be displayed before the block dedicated to the consent to terms & conditions and privacy policy). I tried to move the following but it does not work (see attachment).

$this->setLayout('custom_fields');
$this->type = 'user';
echo $this->loadTemplate();

Maybe is that because one block is address/customer fields and the other is user/custom fields?

Thanks
Imma

Attachments:

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

  • Posts: 81504
  • Thank you received: 13062
  • MODERATOR
5 years 10 months ago #293394

Hi,

This code is for the display of the address fields:

if($this->config->get('address_on_registration',1)) {
?>
<div class="hikashop_registration_address_info_line">
	<div colspan="2" height="40">
		<h3 class="hikashop_registration_address_info_title"><?php echo JText::_( 'ADDRESS_INFORMATION' ); ?></h3>
	</div>
</div>
<?php
		$this->type = 'address';
		echo $this->loadTemplate();
	}
if you swap it with the code I gave in my previous message, which displays the custom user fields, it will do what you want.

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

  • Posts: 80
  • Thank you received: 0
5 years 10 months ago #293509

Thanks for your reply but when I swap the form is not desplayed. I do not know why.
So I adopted another solution: i changed value for core custom fields to use field that I need.
Regards
Imma

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

Time to create page: 0.068 seconds
Powered by Kunena Forum