View Single Post
  #5  
Old 11-10-2019, 08:54 AM
 
Ed B. Ed B. is offline
 

X-Adept
  
Join Date: Apr 2016
Posts: 446
 

Default Re: Redirecting a customer to a custom page after login, depending on parameter

Thank you very much, this tool is really awesome! So here is what seems to be happening.


The function loginBody() (or the doActionLogin() which calls this function) is called when a customer goes to page cart.php?target=login&param=myparam, and click the "Sign in" button. So the instance moves to cart.php?target=login&action=login, and "param" is lost.


There is "fromURL" which is in the instance that I could use if I don't find anything better, but I would like to use directly the value of "param". Obvious thing to do is to get it from the viewer class, but somehow I can't call a viewer class for the target "login". Decorating the class /View/Login.php only modifies admin pages, even if I change the zone in ListChild declaration. And, in any case I will want to change the content of the page cart.php?target=login sooner or later. Any advice on how to call the viewer class for this page?
__________________
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote