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

AbstractOrderEntrymodel INFO attribute : Unable to override info attribute value

Former Member
0 Likes
320

orderentry.infofield.product= product "${code}" with name "${name}" This key is defined in advanced.properties file , Based on this AbstractOrderEntry item's INFO attribute value is set. This functionality is part of DefaultAbstractOrderEntryPreparer.java interceptor configured for AbstractOrderEntry item type.

We are overriding this interceptor to set custom value to INFO field. We can see custom value at end of the overridden interceptor in DEBUG mode but actual value getting saved is still in the OOTB format(above mentioned key's value)

Accepted Solutions (0)

Answers (1)

Answers (1)

mpern
Product and Topic Expert
Product and Topic Expert
0 Likes

have you configured the field replacedInterceptors in your interceptor mapping? If not, this would explain why the field is overwritten with the default value.

 <bean id="customOrderEtryInfoMapping"  
     class="de.hybris.platform.servicelayer.interceptor.impl.InterceptorMapping">
     <property name="interceptor" ref="customOrderEtryInfoInterceptor"/>
     <property name="typeCode" value="AbstractOrderEntry"/>
     <property name="replacedInterceptors" ref="abstractOrderEntryPreparer"/>
     <!-- optional: define order -->
     <property name="order" value="1"/>
 </bean>

Former Member
0 Likes

Yes, We have configured the field replacedInterceptors in xml. Overridden interceptor is getting called not OOTB one.

Former Member
0 Likes

We even tried directly commenting code of setting info value in OOTB interceptor. INFO value is null when we checked in DEBUG mode inside DefaultAbstractOrderEntryPreparer.java. But still somehow info field have value in OOTB format when AbstractOrderEntryModel is saved.

mpern
Product and Topic Expert
Product and Topic Expert
0 Likes

Now this is weird. Try setting a breakpoint inside of AbstractOrderEntryModel#setInfo. This value has to come from somewhere..

Former Member
0 Likes

Hi ,

I have tried that as well, I can see custom value only. After interceptor execution debug pointer didn't come to AbstractOrderEntryModel#setInfo so i guess nowhere else setinfo() is called again.