Payment method test mode flag for orders?

Posts: 5
Joined: 09/25/2007

I've been asked to implement a flag that will indicate if a test order was placed with the card payment system set to test mode. The idea is that test orders can then be easily filtered out. As it stands I can put an entry in the admin comments to say it was done in test mode, but the requirements are for an extra sortable field.

Any suggestions on a good way to go about this?

Gordon

Posts: 155
Joined: 08/07/2007
AdministratorNot Kulvik

Would it work to create an order status for "cc test" orders? You can do that here: http://livetest.ubercart.org/admin/store/settings/orders/edit/workflow
Just replace livetest.ubercart.org with your domain name. I would place the "cc test" status in the "canceled" state.

If you do that, then a little code in the credit card module could create a condition called "cc in test mode" which you could use with workflow-ng to automatically set the order status to "cc test" or whatever you call it.

Just some ideas.
Peace,
Andy

Posts: 5
Joined: 09/25/2007

I don't seem to have that option. Do I need to add another module for it?

Posts: 155
Joined: 08/07/2007
AdministratorNot Kulvik

What version of Ubercart are you using? I think this is only an option in the latest release.
Peace,
Andy

Posts: 5618
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Gordon,

I think instead of adding an admin comment, you're just going to have to store the data in an extra table or extend the order table yourself to include the field. Unfortunately, there's no good way to adjust the order overview table w/o hacking core... that table never made it into TAPIr, and I don't have tablesorting in TAPIr anyways.

You might get away with creating an extra order status for the canceled state and move test orders into that status upon completion. This way they'd only show up in the list for that order status.

Customizable order statuses have been in for a release or two, so you may need to update to get access to them. We'll be putting out Alpha 8 shortly. Cool