Custom Registration form Sections

  • Posts: 104
  • Thank you received: 2
  • Hikamarket Multivendor Hikashop Business
9 years 7 months ago #226544

-- url of the page with the problem -- : www.integrityacademy.co.za
-- HikaShop version -- : 2.6.0

Hi

I am busy creating and educational website that is going to use Hikashop to sell courses.

When the user registers there is a lot of information that I need from them such as name, identification number, occupation, employers details, previous qualifications, as well as documents that they need to submit.

I have looked at custom fields and this will defiantly work for me but my question is this.
If I use the "user" table to capture all this data it it creates one long list is there away to group the info
eg.

Personal Info
(all fields related to personal info would go here)


Experiance
(all fields related to job related info would go here)

Employer Details
(all fields related to the students employer would go here)

Address

and so on.

Last edit: 9 years 7 months ago by SnoozeULooze.co.za.

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

  • Posts: 26264
  • Thank you received: 4043
  • MODERATOR
9 years 7 months ago #226590

Hi,

You can use "user custom fields" and then perform a view override in order to change the look at the registration form.
In that view (user | custom_fields or user | custom_fields_bootstrap), you will find a loop for each custom field.

The idea is to store into a variable the elements you want to group and modify the way that the content is displayed

$groups = array(
   'PERSONAL_TITLE' => array('custom_perso_1', 'custom_perso_2'),
   'EXPERIENCE_TITLE' => array('customer_exp_1'),
   'OTHER_TITLE' => true,
);
foreach($groups as $k => $v) {
?>
<tr class="hikashop_registration_title" id="hikashop_<?php echo $type.'_'.strtolower($k); ?>">
	<td colspan="2"><?php
		echo JText::_( $k );
	?></td>
</tr>
<?php
	$type = $this->type;
	foreach($this->extraFields[$type] as $fieldName => $oneExtraField) {
		if(is_array($v) !in_array($fieldName, $v))
			continue;
		?>
		<tr class="hikashop_registration_<?php echo $fieldName;?>_line" id="hikashop_<?php echo $type.'_'.$oneExtraField->field_namekey; ?>">
			<td class="key">
	<!-- put rest of content from the view which stay unchanged -->
			</td>
		</tr>
<?php
	}   
}
Please understand that we did not test that code and we won't provide any further details or corrections.
That code is there some example and concept illustration but the support does not provide customization.

www.hikashop.com/support/support/documen...ize-the-display.html

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum