VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: MaartenMJR on March 09, 2013, 10:47:04 am

Title: Inconsistence in Virtuemart controllers
Post by: MaartenMJR on March 09, 2013, 10:47:04 am
I recently found a inconsistency in the way Virtuemart controllers deals with redirects. Some controllers use the JController::setRedirect() method while others use the JApplication::redirect() method.

In my application, I reuse the Virtuemart cart Add controller method for a derivative cart component, where I ran into problems because of the hard redirect that is implemented there. Investigation on the Virtuemart controllers shows that the redirect() method is used 18 times, while the setRedirect() method is used 16 times.

From my point of view, it would be reasonable to only use the setRedirect() function and let Joomla decide whether or not a particular redirect needs to be executed, or that a higher priority redirect must be used. Does anyone know whether there is a good reason to use different redirect methods? If not, is it possible to get the setRedirect() method implemented upstream?
Title: Re: Inconsistence in Virtuemart controllers
Post by: Milbo on March 10, 2013, 19:07:34 pm
thanks, good that you say that. This is one of the goals for vm2.1 To reduce redirects and to use the optimal method.
Title: Re: Inconsistence in Virtuemart controllers
Post by: MaartenMJR on March 11, 2013, 16:42:19 pm
Hi Milbo,

Glad you agree with me. If it is possible and appreciable I could implement this mainstream.

For that, I think I'd have to be a Virtuemart developer. Is something like that possible? Or is it better to just post my comments on this forum?