Extending Data Objects
You can extend the data model and data transfer object for Commerce Services using an AddOn.
Extending the Data Model
Procedure
Extending the Data Transfer Object
Procedure
Populating Data
Context
The Converter objects in the <commerce>-* extensions are configured in Spring only and have no separate concrete implementation classes. During the conversion process, they use a list of Populator objects. It is possible to add a Populator to an existing Converter without having to redeclare the Converter. Use the modifyPopulatorList method.
This procedure provides the steps to populate new attributes.
Procedure
Next Steps
The same actions must be performed to the reverse Converter.
Localizing Attributes
Procedure
occaddon-locales_en.properties
type.Customer.nickname.name=Nickname type.Customer.nickname.description=Nickname description type.Customer.workOfficeAddress.name=Work office address type.Customer.workOfficeAddress.description=Work office address
Extending the Data Transfer Object (DTO) for v2
Context
For v2 of Commerce Services, there is an additional DTO layer. It was created to improve the stability and configurability of the response data.
To use the new DTO and configure responses, perform the following steps: