First of all let me start with general remarks about the webmaster mode.
- To use the feature, we need to be logged in as an administrator. As a consequence, we can't use it to find out what goes on in the pages that customers who aren't logged in can see, which is the subject of this post.
- Picking up template from the page disable clicking (which, of course, is necessary), thus it is impossible to picking up template from a pop-up window
- Last but not least, it can be used only for customer section and not for admin section.
So here is my question. I would like to redirect a customer to a page of my choice,
instead of address book page, after registration. A search through this forum shows
that such a feature existed for XC4, e.g.
https://forum.x-cart.com/showthread.php?t=62989&highlight=registration
However, I haven't seen any post on the subject for XC5.
Now, for the reason I mentioned above, it is extremely difficult for me to figure out
which class is responsible for the redirection. However, I found this
Code:
protected function getActionRegisterSuccessURL()
{
return array(
'address_book',
'',
array('profile_id' => $this->getModelForm()->getProfileId(false)),
);
}
in /XLite/Controller/Customer/Profile.php.
So I made a class XLite/Module/VendorID/ModuleID/Customer/Profile.php with
Code:
<?php
namespace XLite\Module\CendorID\ModuleID\Controller\Customer;
class Profile extends \XLite\Controller\Profile
{
protected function getActionRegisterSuccessURL()
{
return array(
'mypage',
'',
array('profile_id' => $this->getModelForm()->getProfileId(false)),
);
}
}
but the customer is still redirected to the address book page after registration. What am I doing wrong here?