I found 2 options for filtering orders with current market:
- Using FindPurchaseOrders API:
OrderSearchOptions searchOptions = new OrderSearchOptions();
OrderSearchParameters parameters = new OrderSearchParameters();
parameters.SqlWhereClause = String.Format("MarketId = '{0}'", ServiceLocator.Current.GetInstance
PurchaseOrder[] purchaseOrderCollection = OrderContext.Current.FindPurchaseOrders(parameters, searchOptions);
- Get all purchase orders then filtering by comparing MarketId:
var orders = OrderContext.Current.GetPurchaseOrders(SecurityContext.Current.CurrentUserId)
.Where( p => p.MarketId.Equals(ServiceLocator.Current.GetInstance
.ToArray();
Hope this help.
Filtering orders by current market by itself is not the problem. I was looking for a simple (non-code) solution to filter by market in the order management inside the Commerce Manager out of the box.
I''m just gonna be bumping this up, as the lack of this will make order management of our current client a total nightmare. When dealing with multiple countries, and all orders in one huge list....yes. That should be it all.
What are the plans for the future for this part of things? I'm guessing it'll be integrated in the EPiServer GUI at some point. And when/if that happens, it should be a nice big "Filter by market"-button somewhere.
No - sorry - there is no out of box support for filter by market in Order management yet. I believe this is customizable, as you can add menus and views to Commerce Manager, but it's sure not simple/no code solution.
Yes, I think it's a nice feature to have - we will definitely consider filtering by market when we implement order management in new Catalog UI.
Regards.
/Q
In a meeting with a customer today, another related and very good suggestion came up:
When this is implemented in some new view, there should be some way of tweaking its looks. For example UIDescriptors or the like, that can modify things like:
Is there a guide or some documentation on how to create these new views? The Apps-folder under the commerce manager is just full of magic template files.
The order manager as it is at the moment is completely unusable for our customer, and it's just a growing problem every day.
You can add another menu beside "Today", "This week" menus by adding another item to Apps\Order\Config\View\Navigation\LeftMenu.xml, and implement a customized order list for market filter feature. The default implementation is Apps\Order\OrderList.ascx.
Still doesn't seem like a realistically doable task without decompiling the manager, making the necessary changes, and compiling my own version of i though.
Seems simple enough to add the necessary menu items for it, but actually hooking up the logic probably happens in code behind (as it should). I'm guessing I need to modify the DataSource set in the core:EcfListViewControl control...
Is there a possibility to filter/group orders in the Order management by which market it was sold in? Possibly beside the "Today" and "This week" style options.
I know this entire commerce manager thing is getting a complete revamp, but if there's something that can be done until that's done, it would be great.
And for the new interface that shall cover the same function: Let there be filtering on market.