cancel
Showing results for 
Search instead for 
Did you mean: 

Custom ASM extension not redirecting to Home page

Former Member
0 Kudos
751

Hi Team ,

I am using Hybris 1808 version for B2B platform and have a requirement to customize ASM addon

We have followed below steps to create it :

  1. Created extgen.properties file in ASM(assistedservicestorefront) addon directory for which we have to generate extension.

               \hybris\bin\ext-addon\assistedservicestorefront\extgen.properties
    
     
    
    
  2. Add below mentioned entry in extensioninfo.xml of assistedservicestorefront addon

               <meta key="extgen-template-extension" value="true"/>
    
     
    
    
  3. run 'ant extgen' command to generate extension

  4. add entry in localextensions.xml file for generated extension and remove the entry of OOTB addon if present

               <extension name='customasmstorefront' />
    
    
  5. Run cms-content.impex for ASM related component with custom asm sttorefront name

  6. Run addon install command

  7. ant all and server start

We have OOTB secureportal addon also installed on our storefront .

After this when we open ASM and log in with asagent credential we are not redirected to our Home page.

To debug it we removed our custom asm addon extension with OOTB ASM addon extension and it ran successfully redirecting us to our home page.

Please provide if there are any steps we missed or need to be corrected . If there is any other approach than also let us know.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member625722
Discoverer
0 Kudos

It's been two years since the question, but I had this problem I few moments ago and I'm going to answer it in case anyone else needs help.

The problem here is because in the secureportaladdon we have a declarion for a bean called "asmRequestProcessor"

One of the attributes of this bean is the addon name for ASM, the default is "asssistedservicestorefront", since you created a new addon, the declaration of the bean doesn't match your landscape.

Here we have the original bean declaration (see property "assistedServiceAddOnName"):

<bean id="asmRequestProcessor" class="de.hybris.platform.secureportaladdon.interceptors.AsmRequestProcessor">
    <property name="sessionService" ref="sessionService"/>
   <property name="addOnValueProviderRegistry" ref="addOnValueProviderRegistry"/>
   <property name="assistedServiceAddOnName" value="assistedservicestorefront"/>
   <property name="asmRequestParameter" value="asm"/>
   <property name="quitAsmRequestUri" value="/assisted-service/quit"/>
   <property name="agentLoggedInKey" value="agentLoggedIn"/>
</bean>

To fix that go to the file "customasmstorefront-web-spring.xml" in your new addon and redeclare the bean as the code below

<alias name="customAsmRequestprocessor" alias="asmRequestProcessor" />
<bean id="customAsmRequestprocessor" class="de.hybris.platform.secureportaladdon.interceptors.AsmRequestProcessor">
   <property name="sessionService" ref="sessionService"/>
   <property name="addOnValueProviderRegistry" ref="addOnValueProviderRegistry"/>
   <property name="assistedServiceAddOnName" value="customasmstorefront"/>
   <property name="asmRequestParameter" value="asm"/>
   <property name="quitAsmRequestUri" value="/assisted-service/quit"/>
   <property name="agentLoggedInKey" value="agentLoggedIn"/>
</bean>