- Posts: 177
- Thank you received: 1
Redirect after account mail validation
- andreasuriani
-
Topic Author
- Offline
Less
More
12 years 1 month ago #168858
by andreasuriani
Redirect after account mail validation was created 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
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.
12 years 1 month ago #168946
by Xavier
Replied by Xavier on topic Redirect after account mail validation
Hi,
Thanks to edit the file "components/com_hikashop/controllers/checkout.php" and add this code:
Just before:
Thanks to edit the file "components/com_hikashop/controllers/checkout.php" and add this code:
Code:
$app->redirect('index.php/welcome');
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.
- andreasuriani
-
Topic Author
- Offline
Less
More
- Posts: 177
- Thank you received: 1
12 years 1 month ago - 12 years 1 month ago #168959
by andreasuriani
Replied by andreasuriani on topic Redirect after account mail validation
Ok, i'm trying.
Last edit: 12 years 1 month ago by andreasuriani.
Please Log in or Create an account to join the conversation.
- andreasuriani
-
Topic Author
- Offline
Less
More
- Posts: 177
- Thank you received: 1
12 years 1 month ago #168961
by andreasuriani
Replied by andreasuriani on topic Redirect after account mail validation
Hi Xavier,
i tried but it seems doesn't works.
Made i mistake?
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.
12 years 4 weeks ago #168976
by Xavier
Replied by Xavier on topic Redirect after account mail validation
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.
- andreasuriani
-
Topic Author
- Offline
Less
More
- Posts: 177
- Thank you received: 1
12 years 4 weeks ago #169077
by andreasuriani
Replied by andreasuriani on topic Redirect after account mail validation
Hi Xavier,
i'm sorry but it doesn't work at all...
i'm sorry but it doesn't work at all...
Please Log in or Create an account to join the conversation.
12 years 4 weeks ago #169090
by Xavier
Replied by Xavier on topic Redirect after account mail validation
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.
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.
- andreasuriani
-
Topic Author
- Offline
Less
More
- Posts: 177
- Thank you received: 1
12 years 4 weeks ago #169149
by andreasuriani
Replied by andreasuriani on topic Redirect after account mail validation
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
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.
12 years 4 weeks ago #169190
by Xavier
Replied by Xavier on topic Redirect after account mail validation
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
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