on ‎2018 May 24 5:00 PM
Hi experts
I plan to extend the product cockpit with a horizontal splitted view:
catalogs/categories -> products -> variants.
What would be the best way to populate the variants-window of an activated base product? In pcm-assortment they use CatalogTreeFilterAdvancedSearchInitializer. But I do not have NavigationNodes, but a base-Product.
Any hints welcome. Thanks, Heiko
Request clarification before answering.
Hi,
in general ProductModel has the property variants. The simplest way to obtain the variants is to use Property Extractor Widget to read the property variants and connect it with a widget that can handle a collection of item it be the Collection Browser or a Quick List.
I hope this helps.
Cheers, Wojtek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now I added a context-populator and initial search stuff used at assortment collection and it works.
I don't understand it, but the result counts. Thanks, Heiko
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
please make sure the getVariants is called and if it returns a List (if the type of Collection is different you may need to wrap it).
Cheers, Wojtek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sounds good. But unfortunately the collectionbrowser does not get the awaited input.
I debug at DefaultWidgetInstanceManager.sendOutput and it looks quite good:
click at a product at second vessel
--> DefaultWidgetInstanceManager.sendOutput with socketId "focusedItem" data: theFocussedProduct
--> DefaultWidgetInstanceManager.sendOutput with socketId "genericOutput" data: list of VariantProducts
--> end.
Especially the CollectionBrowserController.setList will not be reached 😞
what could be wrong?
My configurations:
<widget id="pcmbackoffice-triple-hierarchy-view-thirdvessel-collectionBrowser"
widgetDefinitionId="com.hybris.cockpitng.collectionBrowser" slotId="thirdSlot"
template="false">
..
<setting key="collectionBrowserConfigCtx">pcmbackoffice-assortment-collection-browser</setting>
<setting key="gridViewConfigCtx">pcmbackoffice-grid-view</setting>
<setting key="colConfigCtxCode">pcmbackoffice-listview</setting>
<virtual-sockets>
<input id="list" type="java.lang.Object" />
<output id="selectedItemsToEdit" type="java.lang.Object" />
</virtual-sockets>
</widget>
<widget id="pcmbackoffice-triple-hierarchy-extract-variants" widgetDefinitionId="com.hybris.cockpitng.widgets.common.propextractor"
slotId="cockpitWidgetChildrenInvisible" template="false">
<setting key="expression" type="String">#root.getVariants()</setting>
<setting key="socketDataType_$T" type="String">java.lang.Object</setting>
<virtual-sockets/>
</widget>
<widget-connection sourceWidgetId="pcmbackoffice-triple-hierarchy-view-secondvessel-collectionbrowser" outputId="focusedItem"
targetWidgetId="pcmbackoffice-triple-hierarchy-extract-variants" inputId="genericInput"/>
<widget-connection sourceWidgetId="pcmbackoffice-triple-hierarchy-extract-variants" outputId="genericOutput"
targetWidgetId="pcmbackoffice-triple-hierarchy-view-thirdvessel-collectionbrowser" inputId="list"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.