Skip to main content

[solved] redirect after registration

More
13 years 3 months ago - 13 years 3 months ago #108342 by SG
Hi,

I enabled "Redirect Joomla registration to HikaShop Plugin" and I'm using "HikaShop » Registration form".

How can I redirect the user after registration (but not yet activated) to a different page cause now it just shows the module on the registration page without the fields.(see below)



Thanks
Last edit: 13 years 3 months ago by SG.

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

More
13 years 3 months ago #108343 by SG
Replied by SG on topic redirect after registration
Hi,

I think I found it.

I used the following code in Display -> Views: Checkout / activate_page:
Code:
<?php $app=&JFactory::getApplication(); $app->redirect('mywebsite.com'); ?>

Is this the correct way?

Thanks

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

More
13 years 3 months ago #108353 by nicolas
Replied by nicolas on topic redirect after registration
That's indeed the correct way
The following user(s) said Thank You: SG

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

More
9 years 3 weeks ago #277398 by flexsus
Replied by flexsus on topic redirect after registration
Hi

I have 3 steps in my checkout. In 2nd step user can continue as Guest, Register or Login. I would like users that select Register to be redirected to last step (Confirm status and Payment), even thought the user has not yet clicked the email with activation link.

Would this be activate_page.php or activate.php that I need to override and would it be like this?
Can this be achieved?
Code:
<?php $app=&JFactory::getApplication(); $app->redirect('index.php?option=com_hikashop&ctrl=checkout&task=show&cid=3&Itemid=865'); ?>

Regards,
Henrik

.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building

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

More
9 years 3 weeks ago #277403 by nicolas
Replied by nicolas on topic redirect after registration
Hi,

Once a user has registered his account is blocked until activation.
And it's not possible to login with a blocked account in Joomla.
And it's only possible to finish a checkout if you're logged in or if you're in guest mode.
So even if you change the system to redirect to the next step instead of the displaying the activation page, the user will still have to click on the activation link before finishing his order.

What I would recommend instead is to remove the "registration" option, and instead, activate the "Allow registration after guest checkout" setting of the HikaShop configuration.
That way, you'll only have login or guest as options, and after the guest has finished his order, he will be able to easily register to the website with a link given to him.
The following user(s) said Thank You: flexsus

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

More
9 years 3 weeks ago #277453 by flexsus
Replied by flexsus on topic redirect after registration
Hi Nicolas

Thank you for your answer. I thought so and you made it clear to me.

I will remove registration in the checkout and only have Guest and Login. I have Registration menu item link on top of page, so my users can follow this and complete and afterwards go shopping and checkout.

This will work!

Regards,
Henrik

.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building

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

More
9 years 2 weeks ago - 9 years 2 weeks ago #278004 by flexsus
Replied by flexsus on topic redirect after registration

nicolas wrote: What I would recommend instead is to remove the "registration" option, and instead, activate the "Allow registration after guest checkout" setting of the HikaShop configuration.
That way, you'll only have login or guest as options, and after the guest has finished his order, he will be able to easily register to the website with a link given to him.


I removed the "Registration" in Hikashop > System Configuration > Login & Registration but found out that then my separate registration page (from menu item) did not work. It seemed to work and I was getting no error, but the user registration was not submitted and registered. So I enabled it again and instead removed the following code in my override view /checkout/show_block_login.php:
Code:
/** * Registration in Hikashop configuration is need to allow user registration, but we would not like it to be part of the checkout process. * * if($this->options['registration_registration']) { * $v = JHTML::_('select.option', 0, JText::_('HIKA_REGISTRATION').'<br/>'); * $v->class = 'hikabtn-checkout-registration'; * $values[] = $v; * } * */

This solves my problem and it works as I would preferred it to.

Regards,
Henrik

.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building
Last edit: 9 years 2 weeks ago by flexsus.

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

More
9 years 2 weeks ago #278031 by nicolas
Replied by nicolas on topic redirect after registration
Hi,

If you remove the "registration" option of the checkout and have the "redirect Joomla registration form to hikashop plugin enabled in the Joomla plugins manager, then it won't work properly.
You should disable that plugin in that case, so that you use the Joomla registration form, and not HikaShop's.
That way, you would be able to have it working without any code change. The drawback though is that the Joomla registration doesn't contain the address fields and thus the user would have to enter them during the checkout. So you might want to keep your solution if you want the address fields on the registration.

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

More
9 years 2 weeks ago #278045 by flexsus
Replied by flexsus on topic redirect after registration
Hi Nicolas

I have the "Redirect Joomla registration form to Hikashop plugin" enabled, otherwise as you say I will not have the address fields on checkout. So I keept my solution and both my Hikashop registration and the checkout flow work as I prefers it. So I don't see where you consider it would not work properly?

As I see it now, it works. I have tested it a lot :-)

Regards,
Henrik

.ninja { color: black; visibility: hidden; }
In case of fire:
1. git commit
2. git push
3. exit building

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

Time to create page: 0.179 seconds
Powered by Kunena Forum