Skip to main content

Redirect after account mail validation

More
12 years 1 month ago #168858 by andreasuriani
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.

More
12 years 1 month ago #168946 by Xavier
Hi,

Thanks to edit the file "components/com_hikashop/controllers/checkout.php" and add this code:
Code:
$app->redirect('index.php/welcome');
Just before:
Code:
}else{ return true; } }elseif($userActivation>=2){ $app->enqueueMessage(JText::_( 'HIKA_ADMIN_CONFIRM_ACTIVATION' )); }

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

More
12 years 1 month ago - 12 years 1 month ago #168959 by andreasuriani
Ok, i'm trying.
Last edit: 12 years 1 month ago by andreasuriani.

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

More
12 years 1 month ago #168961 by andreasuriani
Hi Xavier,
i tried but it seems doesn't works.
Code:
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.

More
12 years 4 weeks ago #168976 by Xavier
So can you try to use the following code in the views your tried to edit previously:
Code:
<?php $app = JFactory::getApplication(); $app->redirect('index.php/welcome'); ?>

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

More
12 years 4 weeks ago #169077 by andreasuriani
Hi Xavier,
i'm sorry but it doesn't work at all...

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

More
12 years 4 weeks ago #169090 by Xavier
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.

More
12 years 4 weeks ago #169149 by andreasuriani
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.

More
12 years 4 weeks ago #169190 by Xavier
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.250 seconds
Powered by Kunena Forum