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

Not able to override OOB facade"de.hybris.platform.b2bacceleratorfacades.order.impl.DefaultB2BCheckoutFacade"

former_member45826
Discoverer
0 Likes
1,232

Hi All, Requirement: I need to save the "quoteNumber" in OrderModel. To achieve the same I am overriding one of the method of class "de.hybris.platform.b2bacceleratorfacades.order.impl.DefaultB2BCheckoutFacade" with my custom one. Below are my configuration file:

" ...

 <bean id="oeB2BDefaultCheckoutFacade" class="com.omegaengineering.b2bfacades.order.impl.OEB2BDefaultCheckoutFacade" parent="defaultB2BCheckoutFacade"></bean>

It is always calling parents class method not my custom one. Please help me.

Thanks

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

Hello,

Hybris uses Spring bean aliasing in order to make overriding a bean more flexible. You can read more about that here: https://docs.spring.io/spring/docs/current/spring-framework-reference/core.html#beans-beanname

The short answer is that if you look at the original definition in b2bacceleratorfacades-spring.xml you will see an alias tag which identifies the bean id you truly want to override which is b2bCheckoutFacade. Using your example you would want to do something like this:

``

Former Member
0 Likes

Sorry. Bad markup. The bean definition should look like this:

 <bean id="b2bCheckoutFacade" class="com.omegaengineering.b2bfacades.order.impl.OEB2BDefaultCheckoutFacade" parent="defaultB2BCheckoutFacade"></bean>

All other beans have references to b2bCheckoutFacade.