Skip to Content
1
Dec 20, 2017 at 08:21 PM

How to customize JSP pages used with an AddOn?

612 Views

I'm working wtih Hybris 6.2, we have an Addon which we wish to use to customize the checkout pages in the storefront. Out of the box, these pages are inserted into another JSP from what we've seen and are changed accordingly to the current step the checkout process is.

I read the guides from this page but haven't come across with something that could help me.

We tried to customize the AddPaymentMethodPage.jsp, so we copied the JSP to our AddOn at acceleratoraddon/web/webroot/WEB-INF/views/responsive/pages/checkout/multi.

We compiled our enviroment and I can see the JSP from our addon being copied to the storefront extension at web/webroot/WEB-INF/views/addons/OUR_ADDON/responsive/pages/checkout/multi.

But our customized JSP isn't being used on the storefront.

I don't know how to tell the storefront to use our customized JSP instead of the one set by default during the process of checkout, I checked the initialdata but there's not mapping for these JSPs, which makes sense and the ControllerConstants.java contains the path to the page that should be loaded, for AddPaymentMethodPage.jsp the definition is like this:

 interface Views
 {
     interface Cms // NOSONAR
     {
         String ComponentPrefix = "cms/"; // NOSONAR
     }

     interface Pages
     {
         ...

         interface MultiStepCheckout // NOSONAR
         {
             ...
             String AddPaymentMethodPage = "pages/checkout/multi/addPaymentMethodPage"; // NOSONAR
             ...
         }
                    ...
     }
             ...
 }

There's no mention from where the pages are loaded, so I take the decision to load it from default or from the AddOn is made somewhere else.

What configuration do I have to perform to accomplish this?