cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Cscockpit : editing customer's personal details

Former Member
0 Kudos
1,156

Hello,

I am to Hybris. I want to add new customer attributes in the section of customer details (indicated in the red box below)

how should i proceed, please ? Thank you

Hassine,

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

If you want to redefine this xml file you should:

  • Create an addon

  • Create an identical file to Customer_ReadonlyDetails_CockpitGroup.xml, make changes and place it in corresponding folder

  • Create an impex file to override the cscockpit impex file (projectdata_ui_components.impex) and add INSERT_UPDATE statements

Here you can find an example of redefining Wizard_CsTicket_CreateTicketPage1_CockpitGroup.xml, so just change it to your file and it should work: http://hshanbhag.blogspot.com/2016/06/hybris-cs-cockpit-add-custom-attribute.html

Hope that helps,

0 Kudos

Hi ,

As mentioned earlier, you should consider switching to backoffice, due to the fact cscockpit is deprecated. But for both of those if you want to add some new attributes to the Customer you should:

  • extend data model

  • extend DTO on facade level

  • add populator for your new attributes

Here's a great explanation of those steps: https://help.hybris.com/6.7.0/hcd/8bbdfe9286691014a741829ebffd8512.html . You should perform all steps until Extending the Data Transfer Object (DTO) for v2 (without it).

After doing that, you've got to take care of the front-end layer. If you choose to use cscockpit what you've got to do is go to the folder cscockpit->resources->cscockpit->import->config. In that folder you can find xml files specifying views in cscockpit. What you should look at are files starting with Customer... . For example the Customer_ReadonlyDetails_CockpitGroup.xml file is responsible for the view you've marked on your screenshot. And there you can add new properties to be displayed. Here's my example:

 <list-view unassigned-group-name="Other">
     <group name="General">
         <property qualifier="Customer.type" visible="true"/>
         <property qualifier="Principal.UID" visible="true"/>  
         <property qualifier="Customer.contactEmail" visible="true"/>
         <property qualifier="Customer.customerID" visible="true"/>
         
         <!-- I've added nickname and workOfficeAddress-->
         <property qualifier="Customer.nickname" visible="true"/>
         <property qualifier="workOfficeAddress" visible="true"/>
         <property qualifier="Customer.creationTime" visible="true"/>
     </group>
 </list-view>

Do not forget to perform ant clean all and run an update with the cscockpit toggled.

As regards to the backoffice. The customersupportbackoffice extension is the successor of cscockpit. You can read about it here: https://help.hybris.com/6.0.0/hcd/f35d1ee8751b4988b6f0772a9c9682ea.html

Hope that helps,

Former Member
0 Kudos

Hello,

Customer_ReadonlyDetails_CockpitGroup.xml in not editable ( i am using Intellij Idea)..should i create a new extension with template ycockpit and redefine the xml file there ?

0 Kudos

Try opening it with other editor. I have no problems with editing that.

Marko_salonen
Contributor
0 Kudos

Hi, which version are you using? You should not do anything in the cscockpit because that is deprecated in the newer version and all functionality is available in different views in backoffice.

Former Member
0 Kudos

Hybris version is 6.4