[SOLVED] User registration by Hikashop

  • Posts: 192
  • Thank you received: 1
12 years 3 months ago #36144

Hi,

i would like to know how can i do to redirect user to hikashop user registration if user made a mistake during user registration ?
basically user click on the hikashop user registration menu link and fill the form with every needed data.
when he clicks on register button, if there is a mistake, instead of displaying only error message i would like to redirect user to previous form or at least to display it to make user sees what he did wrong.

thx.


What does not kill you, makes you stronger.
Last edit: 12 years 3 months ago by alain.roger.

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

  • Posts: 81677
  • Thank you received: 13102
  • MODERATOR
12 years 3 months ago #36188

Hi,

To do that, you need to change the code:

	function register(){
		$class = hikashop_get('class.user');
		$status = $class->register($this,'user');
		if($status){
			$app=&JFactory::getApplication();
			$app->enqueueMessage(JText::sprintf('THANK_YOU_FOR_REGISTERING',HIKASHOP_LIVE));
		}
		JRequest::setVar( 'layout', 'after_register'  );
		return parent::display();
	}
to:
function register(){
		$class = hikashop_get('class.user');
		$status = $class->register($this,'user');
		if($status){
			$app=&JFactory::getApplication();
			$app->enqueueMessage(JText::sprintf('THANK_YOU_FOR_REGISTERING',HIKASHOP_LIVE));
			JRequest::setVar( 'layout', 'after_register'  );
			return parent::display();
		}
		$this->form();
	}
in the file components/com_hikashop/controllers/user.php

We'll add that to next release as it makes sense.

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

  • Posts: 192
  • Thank you received: 1
12 years 3 months ago #36196

thank a lot, it works well.


What does not kill you, makes you stronger.

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

Time to create page: 0.057 seconds
Powered by Kunena Forum