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

How to extend service class (OOTB) from backoffice?

2,939

I am trying to override an OOTB class provided by hybris from my custom extension. My extension works fine. I am just trying to extend a hybris provided class that is part of the standard 'backoffice' extension. In my custom class I am able to extend and import the class I'm to extend successfully. Also in the IDE (ee) there are no errors. But when I go to build the project with 'ant all' or 'ant clean all' I get compile error that:

 The import com.hybris.backoffice.cockpitng cannot be resolved

I have also included the required extension in the extensioninfo.xml of my own custom extension.

 <requires-extension name="backoffice"/>

Am I missing something else?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi,

make sure to place your code under backoffice/src. Otherwise it will not see the cockpitng classes.

Cheers, Wojtek

0 Likes

Hi Wojtek,

Yes you are right but what if i want to use this outside backoffice/src. Is there any way to do so?

Answers (1)

Answers (1)

former_member638520
Contributor
0 Likes

Hi,

I think that this documentation : https://help.hybris.com/6.4.0/hcd/94ac56a0aa9f486490bbe1251d994457.html will be helpful 🙂 You should use cng:extenders to this.

Regards,

Lukasz