cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing acceleratorstorefroncommons addon

aniruddha_jadhav
Explorer
0 Kudos

I have created custom B2C accelerator code using modulegen (and b2c_acc recipe). I want to customize abstract controllers in acceleratorstorefrontcommons to customize login and registration code . As best practice, we should not change code in OTB hybris files.

What is the best approach to customize code in acceleratorstorefrontcommons extension? 1. Can we create a new extension using acceleratorstorefrontcommons as a template? If so, how do we do it? 2. Can we create an empty addon and make it depend acceleratorstorefrontcommons? Steps to achieve this? 3. Copy files from acceleratorstorefrontcommons manually to the my storefront extension and change code?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Yes , Aniruddha you r right . for that you need to add ur own AbcRegisterForm.java class that can extends RegisterForm.java and there you can add new attributes in it after that you also need do changes in data class as well .

aniruddha_jadhav
Explorer
0 Kudos

Thanks Itesh

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi If you want to customize the acceleratorestorefrontcommons addon , you need to override the processRegisterUserRequest() method in your own storefront LoginPageController class

aniruddha_jadhav
Explorer
0 Kudos

Hi Itesh,

To give an example, I also need to add a few variables in RegisterForm.java which is present in acceleratorestorefrontcommons. To achieve this without alter acceleratorestorefrontcommons, I have to override this class in storefront extension and add necessary logic in the a new register validator class.

Thanks, Aniruddha

former_member630291
Participant
0 Kudos

Hi, Can you please tell me how did you do it? I'm also facing the same problem and looking for the best way to do it.