Is there any way to make the dashboard order status summary sort by the order status sort order instead of the name? It seems weird to be able to set the order of order statuses, yet the dashboard control doesn't respect it.
A few clients have mentioned it confuses them because they put the statuses in order of their business "flow" but it doesn't show like that on the dashboard.
Dashboard Order Status Sort Order
Dashboard Order Status Sort Order
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
Re: Dashboard Order Status Sort Order
Hi Joe,
I'm sorry that I don't have some code for you to fix this, but I did report it as a bug.
Thanks,
Katie
I'm sorry that I don't have some code for you to fix this, but I did report it as a bug.
Thanks,
Katie
Thank you for choosing AbleCommerce!
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support
-
- Commodore (COMO)
- Posts: 436
- Joined: Tue May 07, 2013 1:59 pm
Re: Dashboard Order Status Sort Order
If you have the source, change the LoadOrderStatusSummaries method in CommerceBuilder\Orders\OrderRepository.cs to this:
Code: Select all
/// <inheritdoc />
public IList<OrderStatusSummary> LoadOrderStatusSummaries(DateTime orderDate)
{
orderDate = LocaleHelper.FromLocalTime(orderDate);
return NHibernateHelper.CreateCriteria<CommerceBuilder.Orders.OrderStatus>("OS")
.CreateCriteria("Orders", "O", NHibernate.SqlCommand.JoinType.LeftOuterJoin, Restrictions.Ge("O.OrderDate", orderDate))
.SetProjection(Projections.ProjectionList().Add(Projections.Property("OS.Id"), "StatusId")
.Add(Projections.Property("OS.Name"), "Status")
.Add(Projections.Count("O.Id"), "Count")
.Add(Projections.Sum("O.TotalCharges"), "Total")
.Add(Projections.GroupProperty("OS.Id"))
.Add(Projections.GroupProperty("OS.Name"))
.Add(Projections.GroupProperty("OS.OrderBy"))) // CUSTOM MODS changed order from OS.Name to OS.OrderBy, so needed to add OrderBy to grouping
.AddOrder(new NHibernate.Criterion.Order("OS.OrderBy", true)) // CUSTOM MODS changed order from OS.Name to OS.OrderBy
.SetResultTransformer(Transformers.AliasToBean(typeof(OrderStatusSummary)))
.List<OrderStatusSummary>();
}
Jay
Re: Dashboard Order Status Sort Order
That worked quite nicely, thanks !
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com