cancel
Showing results for 
Search instead for 
Did you mean: 

Backoffice wizard customization

Former Member
0 Kudos
  1. I created a custom ybackoffice extension with extensioninfo.xml having requires "backoffice"

  2. I have created a custom product itemtype that extends product with few custom attributes and have created a wizard for the same as below

  3.   <wz:flow xmlns:wz="http://www.hybris.com/cockpitng/config/wizard-config" id="EventWizard" title="create.event.title">
             <wz:prepare id="eventPrepare">
                 <wz:initialize property="newEvent" type="ctx.TYPE_CODE"/>
                 
             </wz:prepare>
             <wz:step id="step1" label="create.event.basic.label" sublabel="create.event.basic.sublabel">
                 <wz:content id="step1.content">
                     <wz:property-list root="newEvent">
                         <wz:property qualifier="code"/>
                         <wz:property qualifier="catalogVersion"/>
                         <wz:property qualifier="approvalStatus"/>
                         <wz:property qualifier="eventStatus"/>
                         <wz:property qualifier="eventType"/>
                         <wz:property qualifier="eventOutcome"/>
                         <wz:property qualifier="industryType"/>
                     </wz:property-list>
                 </wz:content>
                 <wz:navigation id="step1.navigation">
                     <wz:cancel/>
                     <wz:next visible="newEvent.catalogVersion != null and newEvent.approvalStatus != null and newEvent.eventStatus != null and newEvent.eventType != null and newEvent.eventOutcome != null and newEvent.industryType != null"/>
                 </wz:navigation>
             </wz:step>
             <wz:step id="step2" label="create.event.date.label" sublabel="create.event.date.sublabel">
                 <wz:content id="step2.content">
                     <wz:property-list root="newEvent">
                         <wz:property qualifier="eventTimeStart"/>
                         <wz:property qualifier="eventTimeEnd"/>
                         <wz:property qualifier="eventCancellationDate"/>
                         <wz:property qualifier="registrationStartDate"/>
                         <wz:property qualifier="registrtionClosingDate"/>
                     </wz:property-list>
                 </wz:content>
                 <wz:navigation id="step2.navigation">
                     <wz:cancel/>
                     <wz:next visible="newEvent.eventTimeStart != null and newEvent.eventTimeEnd != null and newEvent.eventCancellationDate != null and newEvent.registrationStartDate != null and newEvent.registrtionClosingDate != null"/>
                 </wz:navigation>
             </wz:step>
             <wz:step id="step3" label="create.event.mandate.label" sublabel="create.event.mandate.sublabel">
                 <wz:content id="step3.content">
                     <wz:property-list root="newEvent">
                         <wz:property qualifier="eventOrganizationType"/>
                         <wz:property qualifier="eventCoordinator"/>
                         <wz:property qualifier="publicityMode"/>
                         <wz:property qualifier="eventCategory"/>
                         <wz:property qualifier="eventSegment"/>
                         <wz:property qualifier="targetAudience"/>
                         <wz:property qualifier="waitlistAllowed"/>
                         <wz:property qualifier="corpRegister"/>
                         <wz:property qualifier="published"/>
                         <wz:property qualifier="targetNationality"/>
                     </wz:property-list>
                 </wz:content>
                 <wz:navigation id="step3.navigation">
                     <wz:cancel/>
                     <wz:done>
                         <wz:save property="newEvent"/>
                     </wz:done>
                 </wz:navigation>
             </wz:step>
         </wz:flow>
     </context>
    
    
  4. Now after ant clean all, update on the system. i am getting the wizard of the product (parent) when i click on "+" create on the custom product. As shown in attached image Can any one help on resolving this issue? is this because of merging mechanism not properly handled or do i need to comment out the relation with backoffice or platform backoffice to achieve the same ?

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member679962
Active Participant
0 Kudos

OK, that's because you're messing a bit two different approaches. One is creating totally new itemtype and new widgets configuration for it - in this case you have to specify everything in your configuration. The second is extending what's already there. You extend existing itemtype and you want to extend widget configuration (what you've explicitly specified with your context header), but still you specify the whole configuration for the wizard even including the property under which data is available to the widget ( newEvent ). You should read Configurable Flow Wizard widget documentation to check which parts of its configuration are mergeable and leverage this functionality to just add what you need to already existing configuration.

I guess this would be the same cause of explorer tree getting messed up, as you've reconfigured it, but most probably made the same mistake there.

Cheers,
Marcin

former_member679962
Active Participant
0 Kudos

Thanks! The header seems fine.

Please change the <requires-extension name="backoffice"/> to <requires-extension name="platformbackoffice"/>

Cheers,
Marcin

Former Member
0 Kudos

Hi .Thanks for the response. i have done the same. But i see that the other explorer nodes getting removed (like System,Catalog,Multimedia..)these are required though. I also see that the wizard is getting merged with parent but the attributes are viewed as ctx.catalogVersion,ctx.approvalStatus,ctx.product.code . Any leads? Thanks

former_member679962
Active Participant
0 Kudos

Hi,

Could you please attach the <context ...> line of your wizard configuration?

Cheers,
Marcin

Former Member
0 Kudos

Hi , Please find below the context code. may be i would have forgot to paste it properly in the question i added above..:)

     <wz:flow xmlns:wz="http://www.hybris.com/cockpitng/config/wizard-config"
         id="EventWizard" title="create.event.title">
         <wz:prepare id="eventPrepare">
             <wz:initialize property="newEvent" type="ctx.TYPE_CODE" />
             <!-- <wz:assign property="newEvent.catalogVersion" value="ctx.catalogVersion"/> -->
         </wz:prepare>
         <wz:step id="step1" label="create.event.basic.label"
             sublabel="create.event.basic.sublabel">
             <wz:content id="step1.content">
                 <wz:property-list root="newEvent">
                     <wz:property qualifier="code" />
                     <wz:property qualifier="catalogVersion" />
                     <wz:property qualifier="approvalStatus" />
                     <wz:property qualifier="eventStatus" />
                     <wz:property qualifier="eventType" />
                     <wz:property qualifier="eventOutcome" />
                     <wz:property qualifier="industryType" />
                 </wz:property-list>
             </wz:content>
             <wz:navigation id="step1.navigation">
                 <wz:cancel />
                 <wz:next
                     visible="newEvent.catalogVersion != null and newEvent.approvalStatus != null and newEvent.eventStatus != null and newEvent.eventType != null and newEvent.eventOutcome != null and newEvent.industryType != null" />
             </wz:navigation>
         </wz:step>

         <wz:step id="step2" label="create.event.date.label" sublabel="create.event.date.sublabel">
             <wz:content id="step2.content">
                 <wz:property-list root="newEvent">
                     <wz:property qualifier="eventTimeStart" />
                     <wz:property qualifier="eventTimeEnd" />
                     <wz:property qualifier="eventCancellationDate" />
                     <wz:property qualifier="registrationStartDate" />
                     <wz:property qualifier="registrtionClosingDate" />
                 </wz:property-list>
             </wz:content>
             <wz:navigation id="step2.navigation">
                 <wz:cancel />
                 <wz:next
                     visible="newEvent.eventTimeStart != null and newEvent.eventTimeEnd != null and newEvent.eventCancellationDate != null and newEvent.registrationStartDate != null and newEvent.registrtionClosingDate != null" />
             </wz:navigation>
         </wz:step>

         <wz:step id="step3" label="create.event.mandate.label"
             sublabel="create.event.mandate.sublabel">
             <wz:content id="step3.content">
                 <wz:property-list root="newEvent">
                     <wz:property qualifier="eventOrganizationType" />
                     <wz:property qualifier="eventCoordinator" />
                     <wz:property qualifier="publicityMode" />
                     <wz:property qualifier="eventCategory" />
                     <wz:property qualifier="eventSegment" />
                     <wz:property qualifier="targetAudience" />
                     <wz:property qualifier="waitlistAllowed" />
                     <wz:property qualifier="corpRegister" />
                     <wz:property qualifier="targetNationality" />
                 </wz:property-list>
             </wz:content>
             <wz:navigation id="step3.navigation">
                 <wz:cancel />
                 <wz:done
                     visible="newEvent.eventOrganizationType != null and newEvent.eventCoordinator != null and newEvent.publicityMode != null and newEvent.eventCategory != null and newEvent.eventSegment != null and newEvent.targetAudience != null and newEvent.waitlistAllowed != null and newEvent.corpRegister != null and newEvent.targetNationality != null">
                     <wz:save property="newEvent" />
                 </wz:done>
             </wz:navigation>
         </wz:step>
     </wz:flow>
 </context>
Former Member
0 Kudos

this is the contect header : context merge-by="type" parent="Product" type="Event" component="create-wizard"