Closed (won't fix)
Project:
iDEAL Pro | Ubercart Payment
Version:
6.x-2.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
22 Sep 2010 at 10:00 UTC
Updated:
10 Feb 2013 at 21:47 UTC
When uc_ideal_pro_order() is called (operation 'submit'), UC Ideal Pro redirects the user to the page of the chosen bank. This way modules that are heavier than UC Ideal Pro do not get the chance to do their logic when an order gets submitted. I had problems when using the module uc_node_checkout, and noticed this was caused because of this.
A possible solution is to increase the weight of this module and make it heavier than the heaviest module that implements hook_order().
Comments
Comment #1
praseodym commentedAny suggestion for the value?
Comment #2
megachrizI'm not sure to which value the module's weight should be set exactly, because when you set a value you can not be sure if there is yet another module available that is even heavier. uc_node_checkout has a weight of 100, so the weight should be at least set to 101.
I now have fixed it with the code beneath. This code will loop through all enabled modules that implement hook_order(). Then it asks the database what the highest weight is of those modules. It increases the returned value with one and sets the weight of uc_ideal_pro to this value. This way you are sure uc_ideal_pro is the heaviest module that implements hook_order().
The only thing I'm not sure about, is when this code should be called, but I think it should be called every time a new module gets enabled (because in theory that module could be heavier than uc_ideal_pro).
Comment #3
summit commentedSubscribing, greetings, Martijn
Comment #4
praseodym commentedNeeds a proper patch.
Comment #5
praseodym commentedFeel free to reopen with a patch.