How can I display customer IP address in \Administration\Views\Customer\List.cshtml ?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
1 yıl önce
3.90

I want to show customer IP address in Administration\Views\Customer\List.cshtml?

I need to have it here (piece of code from \Customer\List.cshtml):
{
field: "Active",
title: "@T("Admin.Customers.Customers.Fields.Active")",
width: 100,
headerAttributes: { style: "text-align:center" },
attributes: { style: "text-align:center" },
template: '# if(Active) {#  #} else {#  #} #'
}, {
field: "CreatedOn",
title: "@T("Admin.Customers.Customers.Fields.CreatedOn")",
width: 200,
type: "date",
format: "{0:G}"
}, {
field: "LastActivityDate",
title: "@T("Admin.Customers.Customers.Fields.LastActivityDate")",
width: 200,
type: "date",
format: "{0:G}"
},


I tried this the same as in OnlineCustomer, but it doesn't work...
{
field: "LastIpAddress",
title: "@T("Admin.Customers.OnlineCustomers.Fields.IPAddress")"
},


Thanks for your help.
1 yıl önce
Hi
you need to add the IP address logic here first

PrepareCustomerListModel
customerModel.LastIpAddress = customer.LastIpAddress;
1 yıl önce
ilyas_patel wrote:
Hi
you need to add the IP address logic here first

PrepareCustomerListModel
customerModel.LastIpAddress = customer.LastIpAddress;


Is it in source code? Or in .cshmtl file?
1 yıl önce
zaf wrote:
Hi
you need to add the IP address logic here first

PrepareCustomerListModel
customerModel.LastIpAddress = customer.LastIpAddress;

Is it in source code? Or in .cshmtl file?


It is in source code. Method name is PrepareCustomModelForList().
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.