Adding a custom flag in uc_orders

Posts: 7
Joined: 05/29/2008

A client of mine has an offline order fulfillment system that I developed for her. I'm now adding the ability to download Ubercart orders from Ubercart's mySQL back-end. The difficulty I face is in knowing how to query for "all new orders since the last time I checked." An Ubercart order, once downloaded, will not undergo any further processing within Ubercart; thus, its status will not change after this point. (Once an order has moved through check-out and is paid for, its status becomes "Payment_Received" - and this is one criterion I use when selecting orders to download.) For obvious reasons I don't want to simply download all "Payment_Received" orders each time and figure out which ones are new.

The easiest thing to do would be to somehow flag an order when it's downloaded. Can I add a custom status; say, "Downloaded"? or can I add a column in the uc_orders table to hold the flag?

Thanks,
Chap

Posts: 931
Joined: 11/05/2007
Bug FinderFAQ ModeratorGetting busy with the Ubercode.

Chap Harrison wrote:
A client of mine has an offline order fulfillment system that I developed for her. I'm now adding the ability to download Ubercart orders from Ubercart's mySQL back-end.

The uc_edi contribution will do this for you. http://www.ubercart.org/contrib/1515

Chap Harrison wrote:
Can I add a custom status; say, "Downloaded"?

Yes. http://www.ubercart.org/forum/development/6880/adding_order_statuses_mod...

--

<tr>.

Posts: 1300
Joined: 08/14/2007
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.

That's probably the easiest way... mark all downloaded orders and then edit your SQL query to be "WHERE STATUS != 'downloaded'". Might also be sure you're not including in_checkout statuses either.

--

"Pain don't hurt." - Dalton

Mike Nelson's RiffTrax! www.rifftrax.com

Posts: 7
Joined: 05/29/2008

Cool. Thanks a bunch!
Chap