Edit customer fields displayed on e-commerce customer module

jeff McDaniel asked on February 16, 2017 01:29

Hi all,

Does anyone know how to add column headers to the customers page through Kentico? I'd like to add some additional column headers like the kentico documentation has. In the documentation it shows more information like the country, state, company, as well as if the customer is registered. How can I edit what customer information shows on the first page of the customers module?

Image Text

Thanks,

Jeff

Correct Answer

Peter Mogilnitski answered on February 16, 2017 02:56

Jeff,

You have to edit unigrid in CMSModules\Ecommerce\Pages\Tools\Customers\Customer_List.aspx You have to add those columns to the list - I've added CustomerCountryID, CustomerStateID to the "Columns" at the end i.e.

    <cms:UniGrid runat="server" ID="UniGrid" OrderBy="CustomerLastName" IsLiveSite="false"
            Columns="CustomerID, CustomerLastName, CustomerCompany, CustomerFirstName, CustomerEmail, CustomerCreated, CustomerUserID, CustomerSiteID, CustomerCountryID, CustomerStateID"
            ObjectType="ecommerce.customer" RememberStateByParam="">

and in the <GridColumns> section you need to add:

                <ug:Column Source="CustomerCountryID"  Caption="Country" externalsourcename="#countryname"  Wrap="false">
                    <Filter Type="text" />
                </ug:Column>
                <ug:Column Source="CustomerStateID"  externalsourcename="#transform:cms.state:{%StateName%}"  Caption="State" Wrap="false">
                    <Filter Type="text" />
                </ug:Column>

See https://docs.kentico.com/k10/references/kentico-controls/ui-controls/unigrid/reference-unigrid-definition for more info

P.S. Make sure that CustomerStateID, CustomerCountryID have values in your DB: SELECT CustomerStateID, CustomerCountryID from Com_customer

0 votesVote for this answer Unmark Correct answer

Recent Answers


jeff McDaniel answered on February 20, 2017 18:28

Thanks Peter!

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.