Link to confirm new account empties custom fields

  • Posts: 20
  • Thank you received: 2
11 years 11 months ago #79636

Hi

I have searched the forums for an answer to this. This error occurs both in newest Hikashop 2.0.0 and also the most current version previous to that.

The shop is a Joomla! 2.5.8, Hikashop 2.0.0 and it has one custom field:birthday

This is a textfield, for the user table, required and it is set to appear everywhere (frontpage, controlpanel, listing and it is active), see screenshots.

I also has activated the plugin "HikaShop joomla user account link plugin". See screen shot.

This is what happens: A user registers and has to enter a birtday, a javascript makes sure of that. The birtday is stored in the table, I can se that happens (with the use of PHPMyAdmin).

A link is sent to the user to confirm the account and email. After the user clicks the link in the email, the data in the custom field birtday is gone. The custom field is emptied by the user clicking the link in the confirm account email.

Also, if I turn off the plugin, there is no difference. The custom field is emptied then too.

This is not so good, we can't open the store without this information about our customers. :)

Attachments:

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
11 years 11 months ago #79738

Hi,

Please edit the plugin "system hikashopuser".
And replace the code

		$oldUser = $userClass->get($hikaUser->user_id);
		$fieldsClass = hikashop_get('class.field');
		$element = $fieldsClass->getInput('user', $oldUser);
		if(!empty($element)){
			foreach($element as $key => $value) {
				$hikaUser->$key = $value;
			}
		}
By
		$formData = JRequest::getVar('user', array(), '', 'array');
		if(!empty($formData)) {
			$oldUser = $userClass->get($hikaUser->user_id);
			$fieldsClass = hikashop_get('class.field');
			$element = $fieldsClass->getInput('user', $oldUser);
			if(!empty($element)){
				foreach($element as $key => $value) {
					$hikaUser->$key = $value;
				}
			}
		}
It should fix your problem.

Best 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.062 seconds
Powered by Kunena Forum