Redirect after account mail validation

  • Posts: 177
  • Thank you received: 1
10 years 2 months ago #168858

Hi All,
I've tried to find an answer on this topic www.hikashop.com/forum/4-how-to/69496-re...ogin-activation.html but without success.

My registration form (By Hika) works this way:

1)User fill in datas
2)Activation email it sent
3)User click on activation link
4) User is logged but in a "thanks" page.

I would like that when user click on activation link, the link is "index.php/welcome".
I try to modify "checkout / activate_page.php" and "user / after_register.php" but not success.

How can i do this?

Thanks in advance
Andrea

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

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #168946

Hi,

Thanks to edit the file "components/com_hikashop/controllers/checkout.php" and add this code:

$app->redirect('index.php/welcome');
Just before:
					}else{
						return true;
					}
				}elseif($userActivation>=2){
					$app->enqueueMessage(JText::_( 'HIKA_ADMIN_CONFIRM_ACTIVATION' ));
				}

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

  • Posts: 177
  • Thank you received: 1
10 years 2 months ago #168959

Ok, i'm trying.

Last edit: 10 years 2 months ago by andreasuriani.

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

  • Posts: 177
  • Thank you received: 1
10 years 2 months ago #168961

Hi Xavier,
i tried but it seems doesn't works.

if($userActivation<2 && !empty($infos['passwd']) && !empty($infos['username']) && $this->_doLogin($infos['username'],$infos['passwd'],false)){
					$page = JRequest::getString('page','checkout');
					if($page=='checkout'){
						$this->before_address();
						$app->redirect( hikashop_completeLink('checkout'.$url,false,true) );
						$app->redirect('index.php/welcome');
					}else{
						return true;
					}
				}elseif($userActivation>=2){
					$app->enqueueMessage(JText::_( 'HIKA_ADMIN_CONFIRM_ACTIVATION' ));
				}
			}

Made i mistake?

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

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #168976

So can you try to use the following code in the views your tried to edit previously:

<?php
  $app = JFactory::getApplication();
  $app->redirect('index.php/welcome');
?>

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

  • Posts: 177
  • Thank you received: 1
10 years 2 months ago #169077

Hi Xavier,
i'm sorry but it doesn't work at all...

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

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #169090

Hi,

I checked the code once again, and the solution in the "checkout" controller should work.

Thanks to give me the full "thank you" message after an activation via email.
This should put me on the good way.

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

  • Posts: 177
  • Thank you received: 1
10 years 2 months ago #169149

HI Xavier,
the thank you message after activation works fine, but doesn't work the redirect on index.php/welcome.

I need this one.

Andrea

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

  • Posts: 13201
  • Thank you received: 2322
10 years 2 months ago #169190

Hi,

Yeah I understand that it's working, but thanks to give me the full message in order to help to find the correct place to add code for the redirect ;)

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

Time to create page: 0.075 seconds
Powered by Kunena Forum