cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Backoffice Product Content Management customization

0 Likes
2,122

Hello Experts,

In the Products Search and Browse View of "Backoffice Product Content Management" (Product Cockpit) , products appear as grid by default. The configuration comes from the file hybris\bin\ext-backoffice\pcmbackoffice\resources\pcmbackoffice-backoffice-config.xml:

 <context type="Product" component="pcmbackoffice-collection-browser" >
     <cb:collection-browser xmlns:cb="http://www.hybris.com/cockpitng/config/collectionbrowser">
         <cb:available-molds default-mold="grid-view">
             <cb:mold spring-bean="listViewCollectionBrowserMoldStrategy"/>
             <cb:mold spring-bean="gridViewCollectionBrowserMoldStrategy"/>
         </cb:available-molds>
     </cb:collection-browser>
 </context>

I want to change the default for the mold from the grid-view in list-view. Of course, the right place is not in the above configuration file.

Does anyone knows how and where?

I've already tried in a custom extension in the xyz-backoffice-config.xml, but with no result.

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

It's working with:

 <context type="Product" component="pcmbackoffice-collection-browser" module="pcmbackoffice">
     <cb:collection-browser xmlns:cb="http://www.hybris.com/cockpitng/config/collectionbrowser">
         <cb:available-molds default-mold="list-view">
             <cb:mold spring-bean="listViewCollectionBrowserMoldStrategy"/>
             <cb:mold spring-bean="gridViewCollectionBrowserMoldStrategy"/>
         </cb:available-molds>
     </cb:collection-browser>
 </context>

Was missing "module="pcmbackoffice"".

0 Likes

Hi guys! I met similar issue with pcmbackoffice component pcmbackoffice-actions-explorer-tree-toolbar-primary I'm going to add action com.amway.lynx.actions.uploadMass.images and add module="pcmbackoffice" for the component pcmbackoffice-actions-explorer-tree-toolbar-primary, but when I click F4 in backoffice, it's present module="pcmbackoffice" module and my module="XXXpcmbackoffice" (extensssion name) <context component="pcmbackoffice-actions-explorer-tree-toolbar-primary" module="pcmbackoffice"> <y:actions xmlns:y="http://www.hybris.com/cockpit/config/hybris"> <y:group qualifier="common"> ........... </context><context component="pcmbackoffice-actions-explorer-tree-toolbar-primary" module="XXXpcmbackoffice"> <y:actions xmlns:y="http://www.hybris.com/cockpit/config/hybris"> <y:group qualifier="common"> <y:label>actiongroup.common</y:label> <y:action action-id="com.amway.lynx.actions.uploadMass.images"/> <y:action action-id="com.hybris.cockpitng.action.delete" property="selectionContext.selectedObject instanceof T(de.hybris.platform.core.model.ItemModel) ? selectionContext.selectedObject : null" triggerOnKeys="#del"/> </y:group> </y:actions> </context>

0 Likes

Can you please let me know if you created new extension for pcmbackoffice customization? I want to do something similar. Please let me know how did yo create custom extension or how you extended this xml to your extension.

0 Likes

The above XML excerpt has been added to a new extension in the extensionname-backoffice-config.xml.

The extension has also <requires-extension name="b2bacceleratorservices"/>

And of course is of type <meta key="backoffice-module" value="true"/>

Answers (2)

Answers (2)

0 Likes

Hello Hazem,

I did it exactly as you describe. In the xyz-backoffice-config.xml I add this :

 <context merge-by="type" type="Product" component="pcmbackoffice-collection-browser" >
     <cb:collection-browser xmlns:cb="http://www.hybris.com/cockpitng/config/collectionbrowser">
         <cb:available-molds default-mold="list-view">
             <cb:mold spring-bean="listViewCollectionBrowserMoldStrategy"/>
             <cb:mold spring-bean="gridViewCollectionBrowserMoldStrategy"/>
         </cb:available-molds>
     </cb:collection-browser>
 </context>

(copy-paste from the pcmbackoffice extension and changed accordingly).

And of course "ant clean all". But still doesn't work.

hfarahat
Associate
Associate
0 Likes

Hello Mihai,

The xyz-backoffice-config.xml in a custom extension should work.

your custom extension extensioninfo.xml should have:

  <requires-extension  name="backoffice"/>

and

 <meta key="backoffice-module" value="true"/>

and after making any changes to the backoffice config file, make sure to click on 'Reset Everything' from the back office orchestrator (accessible by clicking F4 in backoffice)

I hope this helps.

0 Likes

Hello Hazem, Thanks for the answer. Read my answer below.