1

I added one attribute in AbstractOrderEntryModel, but I want to populate this attribute in OrderEntryData. I added just a new property in OrderEntryData but it's not working.

So to get this in OrderEnryData do we have to write separate populator for this?

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48

1 Answers1

0

Add the new attribute in extension-beans.xml. Below code will add the new attribute to the existing OrderEntryData bean.

<bean class="de.hybris.platform.commercefacades.order.data.OrderEntryData">
    <property name="newAttribute" type="Integer"/>
</bean>

You will also need to create a new Populator (see de.hybris.platform.commercefacades.order.converters.populator.OrderEntryPopulator for reference), and add the populator to the converter via customextenstion-spring.xml.

<bean id="customOrderEntryPopulator" class="com.chang.populators.CustomOrderEntryPopulator" />

<bean parent="modifyPopulatorList">
    <property name="list" ref="orderEntryConverter"/>
    <property name="add" ref="customOrderEntryPopulator"/>
</bean>

Other references:

geffchang
  • 3,279
  • 2
  • 32
  • 58