cancel
Showing results for 
Search instead for 
Did you mean: 

How to remove/delete a context in backoffice config xml

0 Kudos
1,083

Hi,

I need to remove the create-wizard context config of AbstractPromotionRestriction from Backoffice Config xml that is getting injected from PromotionsBackOffice Extension.

I need to remove the context as the custom promotion creation is not proper in backoffice if we have the create wizard. Only on removal of the context(tried in direct config xml from Orchestrator), am able to create the custom promotions in backoffice without error.

Please suggest.

Thanks

View Entire Topic
Former Member
0 Kudos

Hello,

Have you tried by adding merge-mode="remove" in your create-wizard context. Define the entire context in your custom backoffice extension and try below code.

 <context merge-by="type" type="AbstractPromotionRestriction" component="create-wizard" merge-mode="remove">
         <wz:flow xmlns:wz="http://www.hybris.com/cockpitng/config/wizard-config" id="PromotionRestrictionWizard" title="create.title(ctx.TYPE_CODE)">
             <wz:prepare id="PromotionRestrictionPrepare">
                 <wz:initialize property="newPromotionRestriction" type="ctx.TYPE_CODE" />
             </wz:prepare>
             <wz:step id="step1">
                 <wz:content id="step1.content">
                     <wz:property-list root="newPromotionRestriction">
                         <wz:property qualifier="descriptionPattern" />
                     </wz:property-list>
                 </wz:content>
                 <wz:navigation id="step1.navigation">
                     <wz:cancel />
                     <wz:done>
                         <wz:save property="newPromotionRestriction" />
                     </wz:done>
                 </wz:navigation>
             </wz:step>
         </wz:flow>
     </context>


0 Kudos

Hi,

I have tried this way . No use.

Thanks Anyways!

Vaibhav-07
Explorer
0 Kudos

Hi, merge-mode="remove" worked for me for below snippets -

  <context merge-by="principal" component="explorer-tree" principal="admin">
     <explorer-tree:explorer-tree xmlns:explorer-tree="http://www.hybris.com/cockpitng/config/explorertree">
         <explorer-tree:navigation-node id="hmc_treenode_order">
             <explorer-tree:type-node code="FraudReport" id="FraudReport" merge-mode="remove"/>
         </explorer-tree:navigation-node>
     </explorer-tree:explorer-tree>
 </context> 

May be you can give a try to this.

0 Kudos

Hi ,

Merge mode will work for explorer tree nodes, editor area tabs, sections, List view and many more.

But my requirement is to remove the context itself. Since it is overriding OOTB one and causing problem. There is no reference of removing a context anywhere in OOTB..

Thanks Anyways