Closed (fixed)
Project:
Ubercart
Version:
6.x-2.x-dev
Component:
Orders
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Jul 2010 at 06:43 UTC
Updated:
26 Oct 2011 at 15:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
AlexisWilke commentedwqmeng,
Note that you can change the order in which events occur by changing their weight. That may help you?
In regard to comments, they are separate because it is a 1 to many (1 order many comments.) Therefore, a separate table was created for the comments.
Thank you.
Alexis
Comment #2
wqmeng commentedHere is the trigger where been called.
So in this condition, that the new status changed, the CA action get called before the lastest comment been save to the database.
Change the status first or save the comment first? IMO, should be save the comment then save the status before the CA action.
As when the new status changed, you may need the lastest comment to explain Why the order status get changed, like send emails with the latested comment.
http://articlesforge.com/
Thanks
Comment #3
wqmeng commentedHi, change the event weight will not do the work, please look my code posted here,
The order status get changed always before the new comment added to the database.
So if you add new CA actions code or just add a email send with the last comment, the comment is not the new added one.
You may test it with a order,
1) add a order status CA
2) add custom php code to display the last comment you load from database.
3) update the order status to get the result
You will find that the last comment alway is the last comment before you add the new comment in the admin order pane.
I mean add order comment not admin comment.
Thanks
http://articlesforge.com/
Comment #4
AlexisWilke commentedDid you try to move the 1st if() after the 3rd one? Does that work for you? If so, great, then post a patch.
Thank you.
Alexis
Comment #5
wqmeng commentedHi, I am now testing on it, when finished I will post a patch here.
Comment #7
wqmeng commentedHello,
As #4, move the 1st if() after the 3rd one? Does that work for you? If so, great, then post a patch.
Will works, I have custom codes in this function, so someone may post a patch here,
Thanks
http://articlesforge.com/
Comment #8
wqmeng commentedHere the patch.
Comment #9
longwaveFixed in both branches.