I'm trying to use the new ClearCart method, but it always returns an "Invalid Order no" error.
Here's what I'm doing: GetNewSessionKey, Login, AddContribution, GetOrder, and then using GetOrderResults->Order->order_no from the GetOrder method I call ClearCart. Everytime I get "Invalid Order no". Ideas?
Thanks!
-Morgan
Looking at the database procedure, it appears this procedure checks that the order exists in the T_ORDER table, meaning it has already been saved via SaveCart. Perhaps it is intended to be used after LoadExistingOrder?
David
Hi Morgan,
I could be wrong here, but I think you have to save the order before this method will do anything.
I know that the purpose of this method is to clear orders from the T_WEB_ORDER table so they can be loaded on the web a second time (if you don’t clear an order from that table you’ll get an error the next time you try to load it on the web). It is not to cancel an incomplete order. That’s not clear in the current API Document, but I happen to be at work on that document right now and just clarified the section on this method (which is the only reason I know anything about this).
Kevin Sheehan
Documentation & Learning Resources Specialist
Tessitura Network
1 888 643 5778 ext 329 Office
ksheehan@tessituranetwork.com
Thanks, David and Kevin. If this doesn't work, what would be the proper way to clear items out of the current cart?
Also, I can't find any method to save a cart. ??
Not finding anything else in the documentation on this. So, we've created a modified version of WP_CLEAR_CART that works on T_WEB_ORDER instead of T_ORDER. Called via ExecuteLocalProcedure, it works great.