How to add Last Login Date to Contact list in Commerce Manager?

Malin Nilsson
Member since: 2008

In the Customer list view in Commerce Manager my customer also want to see last login date as a column.

Last login Date is availible on the account connected to each customer, But how do I get that column to show in the list view? That field is not availble in the list of fields to add. 

#200411 Jan 11, 2019 10:19
  • Scott Reed
    Member since: 2010

    I think looking in the commerce application project you could have apps->customer->Config->View with a whole load of XML views. You need to add the field in as an item XML element. I'm not sure which of the views it is, you'll have to experiment

    #200414 Edited, Jan 11, 2019 11:07
  • Quan Mai
    Member since: 2011

    I would suggest to add a metafield to your Contact class, and update that field when an user logs in. Then you can use a new view which include that column

    Doing like Scott suggested is of course one way to go, but it's not trivial and not officially supported (grey areas). And it is tricky if you use something like AspNetIdentity  

    #200419 Edited, Jan 11, 2019 12:27
  • Malin Nilsson
    Member since: 2008

    Thanks for the input Quan Mai!

    Is there a way to add that column to the view programatically or do I have to do it manually?

    #200621 Jan 17, 2019 14:34
  • Quan Mai
    Member since: 2011

    There should be a programmatically way to do it, but I'd suggest to do it manually. The API is not that well known (and I'm too lazy to look into it :) )

    #200622 Jan 17, 2019 14:37