Re: Redirect after registration

  • Posts: 31
  • Thank you received: 2
13 years 5 months ago #21562

Hello,

If I register to my Hikashop I get redirected to an empty page. How can I adjust this? You mentioned earlier to me that I have to adjust the script of the file user.php. But I, being a php noob,dont know where to put the redirect script in the file. Can you show me where to place this code?

Greetings,

Dizma

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

  • Posts: 83020
  • Thank you received: 13402
  • MODERATOR
13 years 5 months ago #21567

Hi,

you need to add the code:
$app->redirect(' www.mywebsite.com/myURL ');
after the code:
$app->enqueueMessage(JText::sprintf('THANK_YOU_FOR_REGISTERING',HIKASHOP_LIVE));
in the file components/com_hikashop/controllers/user.php

We'll change a bit the system in next release so that you will be able to add the redirect in a view and avoid changing a core file of HikaShop (that way you will be able to update without having to reapply your changes).

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

  • Posts: 31
  • Thank you received: 2
13 years 5 months ago #21621

Hello,

I added youre code to the designated user.php file after the code you mentioned but it doesnt work. After registering I still see an empty page. Isnt It strange that I dont even see a string of code configurated in the language file? The url to page looks like this:
www.myurl.com/index.php/registreer/check...ctivate_page/lang-nl
Whats going wrong here?

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

  • Posts: 83020
  • Thank you received: 13402
  • MODERATOR
13 years 5 months ago #21642

It's probably because the URL you put in the code is not valid or that the page there is not ok. On the link you gave, I can see that you have an iframe with the URL:
tg.php?uid=www4e26b2a1390a20.55891913&src=&cat=computers%2Finternet%2Fdownloads&kw=Domain+Names&sc=internet
However, the URL of the page is www.myurl.com/index.php/registreer/check...ctivate_page/lang-nl
So the iframe URL becomes: www.myurl.com/index.php/registreer/check...in+Names&sc=internet
which is not valid and cannot be loaded.
Your iframe URL should be absolute.

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

  • Posts: 31
  • Thank you received: 2
13 years 5 months ago #21644

Sorry, I dont get it.
The code displayed in my last reply is the code where Hikashop sends me whitout the piece of script added. So the original file in the original setting.

Last edit: 13 years 4 months ago by smedia.

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

  • Posts: 83020
  • Thank you received: 13402
  • MODERATOR
13 years 5 months ago #21647

Nevermind my previous post... I clicked on the URL you gave and didn't look at the domain name and though that it was a page of your website not working...

If the page www.myurl.com/index.php/registreer/check...ctivate_page/lang-nl is blank, it's because your template is missing some code in order to display the messages:
www.hikashop.com/support/documentation/6...issues.html#messages

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

  • Posts: 31
  • Thank you received: 2
13 years 4 months ago #21673

Ah, thats the trick for the standard message after login :)
Very nice!

But still, I,d like to redirect to a page with my own design.
This is the code I put in.

$app->enqueueMessage(JText::sprintf('THANK_YOU_FOR_REGISTERING',HIKASHOP_LIVE));
$app->redirect(' www.myurl.nl/index.php?option=com_conten...ry&layout=blog&id=23 ');
...

Am I doing something wrong here. I also tried it with http:// in front of the url.

Last edit: 13 years 4 months ago by smedia.

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

  • Posts: 83020
  • Thank you received: 13402
  • MODERATOR
13 years 4 months ago #21680

That's not the code you should change.
You should add your redirect in the file administrator/components/com_hikashop/classes/user.php instead of the code:
$app->redirect(hikashop_completeLink('checkout&task=activate_page&lang='.$locale,false,true));
And you should put the http://

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

  • Posts: 31
  • Thank you received: 2
13 years 4 months ago #21693

This is exactly what I mean :)

Thnx, for the help!

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

  • Posts: 567
  • Thank you received: 11
2 years 8 months ago #340946

is there new method to control this after 10 years?

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

  • Posts: 83020
  • Thank you received: 13402
  • MODERATOR
2 years 8 months ago #340951

Hi,

Well, first what exactly do you want to control ?
Normally, HikaShop's registration is used mainly on the checkout. And thus, after the registration on the checkout, the user goes back to the checkout. So there should be no need to change anything to that.
The only case where this might be needed is if you're talking about the HikaShop registration form page.
After the registration there, the system displayed the "after_register" view file of HikaShop with a text "Thank you for your registration".
If you want to change that, there are several ways:
- You could simply do a translation override of that text if you want to change the text:
www.hikashop.com/download/languages.html#modify
- You could edit the file user / after_register via the menu Display>Views to add the text you want to that view file.
- You could also add a redirect to somewhere else in that same view file. For example:

<?php JFactory::getApplication()->redirect('XXX'); ?>
where XXX is the URL of the page you want to display to the user after the registration from the HikaShop registration form page.

Finally, note that if you're using Joomla's registration form page, all this won't apply to it as this is controlled by Joomla, not HikaShop.

The following user(s) said Thank You: Kittisak112

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

Time to create page: 0.093 seconds
Powered by Kunena Forum