Lookup order by Order Number
Lookup order by Order Number
Hello All,
We're trying to implement an "Order Lookup" page on our site.
How do I look up an order using the OrderNumber?
The default email that the customer gets uses the order number. But I've not been able to find a way to do an order lookup using the OrderNumber.
Surely, I'm just missing something.
The only catch, is that I am limited to "out of the box" components on this project. (Otherwise, I'm guessing a simple DB query would match/cross the orderNumber to an OrderID).
Thanks,
-tomas
We're trying to implement an "Order Lookup" page on our site.
How do I look up an order using the OrderNumber?
The default email that the customer gets uses the order number. But I've not been able to find a way to do an order lookup using the OrderNumber.
Surely, I'm just missing something.
The only catch, is that I am limited to "out of the box" components on this project. (Otherwise, I'm guessing a simple DB query would match/cross the orderNumber to an OrderID).
Thanks,
-tomas
Re: Lookup order by Order Number
Just use the LoadForOrderNumber method and it will load the appropriate order.
Re: Lookup order by Order Number
Is that a new function? It's not in the API docs.mazhar wrote:Just use the LoadForOrderNumber method and it will load the appropriate order.
The closest function is "LoadForGoogleOrderNumber()". Is this the same thing?
-tomas
Re: Lookup order by Order Number
What is your AbleCommerce version?
Re: Lookup order by Order Number
We're on version 7.0.2mazhar wrote:What is your AbleCommerce version?
(Are the Docs out of date?)
-tomas
Re: Lookup order by Order Number
Sorry It was my mistake, it was LoadForGoogleOrderNumber and I misunderstood it. You can load order by order number as below
Code: Select all
OrderCollection orders = OrderDataSource.LoadForCriteria("OrderNumber = " + orderNumber + " AND StoreId = " + Token.Instance.Store.StoreId.ToString());
Re: Lookup order by Order Number
Thanks for the snippet!
I'm learning something new on this project every day.
-tomas
I'm learning something new on this project every day.

-tomas
mazhar wrote:Sorry It was my mistake, it was LoadForGoogleOrderNumber and I misunderstood it. You can load order by order number as belowCode: Select all
OrderCollection orders = OrderDataSource.LoadForCriteria("OrderNumber = " + orderNumber + " AND StoreId = " + Token.Instance.Store.StoreId.ToString());