[solved] redirect after registration

  • Posts: 101
  • Thank you received: 12
5 years 5 months ago #108342

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: 5 years 5 months ago by SG.

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

  • Posts: 101
  • Thank you received: 12
5 years 5 months ago #108343

Hi,

I think I found it.

I used the following code in Display -> Views: Checkout / activate_page:

<?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.

  • Posts: 63978
  • Thank you received: 9222
  • MODERATOR
5 years 5 months ago #108353

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.

  • Posts: 135
  • Thank you received: 7
  • Hikamarket Multivendor Hikashop Business
1 year 2 months ago #277398

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?

<?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.

  • Posts: 63978
  • Thank you received: 9222
  • MODERATOR
1 year 2 months ago #277403

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.

  • Posts: 135
  • Thank you received: 7
  • Hikamarket Multivendor Hikashop Business
1 year 2 months ago #277453

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.

  • Posts: 135
  • Thank you received: 7
  • Hikamarket Multivendor Hikashop Business
1 year 2 months ago #278004

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:
/**
 * 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: 1 year 2 months ago by flexsus.

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

  • Posts: 63978
  • Thank you received: 9222
  • MODERATOR
1 year 2 months ago #278031

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.

  • Posts: 135
  • Thank you received: 7
  • Hikamarket Multivendor Hikashop Business
1 year 2 months ago #278045

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.102 seconds
Powered by Kunena Forum