Author Topic: Inconsistence in Virtuemart controllers  (Read 4543 times)

MaartenMJR

  • Beginner
  • *
  • Posts: 4
Inconsistence in Virtuemart controllers
« 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?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9973
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Inconsistence in Virtuemart controllers
« Reply #1 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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

MaartenMJR

  • Beginner
  • *
  • Posts: 4
Re: Inconsistence in Virtuemart controllers
« Reply #2 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?