Registration activation-link uses wrong template.

  • Posts: 1
  • Thank you received: 0
12 years 11 months ago #34968

Hi there,

I am using Hikashop and basically my shop is setup, but there is still one small bug, which I cant fix.
If a user registers and receives his activation link via E-Mail and clicks on it, a page appears with an error-message.
The error is basically, that the link is using a different template-style, than the shop and this template-style does not work with hikashop.
Now my question is, how do I change the template, that Hikashop is using for this?

I have the same problem with order-links...

Can anybody help me?

Thanks a lot!!

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

  • Posts: 83041
  • Thank you received: 13405
  • MODERATOR
12 years 11 months ago #35004

Hi,

That's because of the Itemid parameter in that URL.
Please edit the file administrator/components/com_hikashop/classes/user.php and change the line:
$this->registerData->activation_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=activate&activation='.$user->get('activation').'&infos='.$vars.'&page='.$page.'&id='.$this->user_id;


to:
global $Itemid;
$url = '';
if(!empty($Itemid)){
$url='&Itemid='.$Itemid;
}
$this->registerData->activation_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=activate&activation='.$user->get('activation').'&infos='.$vars.'&page='.$page.'&id='.$this->user_id.$url;


And try again to register via HikaShop. That should give an activation link with the current template selected.

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

  • Posts: 3
  • Thank you received: 0
11 years 5 months ago #113677

I did substitute the code but still the same problem , I believe that the normal link should be like this

...../index.php/login?view=registration --- like example

whereas the abnormal link which causes the template mistake is

...../index.php/shop-login?view=registration


by the way I found the two line of code you mentioned are matched , so no need to edit them , I think that the problem because of another thing , maybe template override . I m not sure but I will keep on finding the solution and return back here to post .

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

  • Posts: 83041
  • Thank you received: 13405
  • MODERATOR
11 years 5 months ago #113741

login and shop-login are two different menu items on your website.
HikaShop needs to link to the activation page of HikaShop so the id has to be a menu item of the type hikashop something.
If your login menu item is not a hikashop type menu item, you won't be able to use it even if you modify the code to force the id of the Itemid parameter of the URL there.
I guess the best would be to simply assign the template you want to the shop-login menu item.

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

Time to create page: 0.074 seconds
Powered by Kunena Forum