Total Posts:
27
Karma:
145
Joined:
2/8/2019
Location:
Canada
In the admin orders section, I have added a new column. { field: "SupervisorEmail", title: "@T("admin.orders.fields.supervisor")", width: 150, template: '%Customer.CustomSupervisorEmail%' }, The message template works correctly for emails. The token is replaced with the correct email of the supervisor. Is there a way to display this dynamic data in the admin orders list as well? Right now it simply prints out "Customer.CustomSupervisorEmail%".
Total Posts:
27
Karma:
145
Joined:
2/8/2019
Location:
Canada
In OrderController.cs, I have: var gridModel = new DataSourceResult { Data = orders.Select(x => { var store = _storeService.GetStoreById(x.StoreId); return new OrderModel { Id = x.Id, StoreName = store != null ? store.Name : "Unknown", OrderTotal = _priceFormatter.FormatPrice(x.OrderTotal, true, false), OrderStatus = x.OrderStatus.GetLocalizedEnum(_localizationService, _workContext), OrderStatusId = x.OrderStatusId, PaymentStatus = x.PaymentStatus.GetLocalizedEnum(_localizationService, _workContext), PaymentStatusId = x.PaymentStatusId, ShippingStatus = x.ShippingStatus.GetLocalizedEnum(_localizationService, _workContext), ShippingStatusId = x.ShippingStatusId, CustomerEmail = x.Customer.Email, CustomerFullName = string.Format("{0} {1}", x.BillingAddress.FirstName, x.BillingAddress.LastName), CreatedOn = _dateTimeHelper.ConvertToUserTime(x.CreatedOnUtc, DateTimeKind.Utc), SupervisorEmail = x.GetAttribute<string>("customer_attribute_5") }; }), Total = orders.TotalCount }; In bold is the addition I made. This value is returning NULL.