cancel
Showing results for 
Search instead for 
Did you mean: 

Bulk Edit : How to restrict category list to Stage Version while bulk editing

0 Kudos

Hybris version v1811.

One of the requirement client requested for bulk edit is to restrict the listing of Category list to only from stage catalog version.

For regular area we are able to do it using ReferenceSearchCondition, but on analysis what i found is that the Bulk edit is generated by utilizing the wizard configuration in backoffice-cockpit-config.xml

 <context type="Product" merge-by="type" component="bulk-edit-wizard">
     <wz:flow id="bulkEditWizard" title="bulkedit.wizard.title" size="large">
           <wz:step id="step1" label="bulkedit.wizard.step.select.attributes" sublabel="bulkedit.wizard.step.select.sublabel">
 

in Step2 of the flow it utlize the bean definition BulkEditRenderer to generate the same

         <wz:step id="step2" label="bulkedit.wizard.step.change.attributes" sublabel="bulkedit.wizard.step.change.sublabel">
             <wz:content id="step2.content">
                 <wz:custom-view id="attributesEdit" lang="zul" merge-mode="replace">
                     <wz:renderer spring-bean="bulkEditRenderer" >
                         <wz:parameter>
                             <wz:name>bulkEditFormModelKey</wz:name>
                             <wz:value>bulkEditForm</wz:value>
                         </wz:parameter>
                         <wz:parameter>
                             <wz:name>editor:description</wz:name>
                             <wz:value>com.hybris.cockpitng.editor.localized(com.hybris.cockpitng.editor.wysiwyg)</wz:value>
                         </wz:parameter>
                     </wz:renderer>
                 </wz:custom-view>
             </wz:content>
         </wz:step>

Is there a way to restrict the category attribute to show results from stage catalog alone by passing parameter during bulk edit?

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

mp_arineo

1. You need to use {} around the value if u want it to be evaluated

2. For a reference serach context you will have an access only to the template object - if you have initialised it properly then just use <wz:value>{parentObject.catalogVersion}</wz:value>.

You can debug here to see how the condition value and your params are resolved

com.hybris.cockpitng.editor.commonreferenceeditor.ReferenceEditorSearchConditionHandler#getAllSearchQueryConditions

former_member625836
Active Contributor
0 Kudos

Hi ,

According to this document you can have it done by setting renderer parameters using following convention: editor:[ATTRIBUTE_QUALIFIER]:[EDITOR_PARAMETER_NAME].

Cheers, Jacek

mp_arineo
Member
0 Kudos

Hi,

I understand that i have to create an wizard parameter but i dont understand which possible value has to go in for editor_parameter_name. I tried

<wz:name>editor:supercategories:referenceSearchCondition_catalogVersion</wz:name>

and

<wz:value>ctx.parentObject.catalogVersion</wz:value>

and multiple other variants but nothing worked.

Maybe you can give me an example for my case.

Thanks