cancel
Showing results for 
Search instead for 
Did you mean: 

CS Cockpit Customization widget not shown.

Former Member
0 Kudos

I get the following warn message when trying to display a custom widget in CS Cockpit:INFO [Thread-16] [AbstractWidgetContentBrowser] Widget with code 'voucherWidget' mapped but not available in layout template. Ignoring... Also my widget is not displayed in the CS Cockpit even thoug it is declared in the zul file. Does anybody know how to fix that? Any help whould be appreciated. Thank you.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I want to customize the default behavior of CSCockpit BasketCartWidget. The default behavior shows like the following :

FIred Promtoion | Consumed Cart Line iem | Potential Promotion

Suppose for product A , 10 quantities are added and they qualify for multibuy promotion then all the cart items are shown in separate line items which overflows the cart. I want to group the consumed cart items and show the unconsumed ones separately.

I need help with the touchpoints for this customization.

shankaranandjha
Explorer
0 Kudos

Steps To add a widget to Order browser ...May be this will help you to understand full flow

Step1: Create testcscockpit-spring-widgets.xml file in the resource folder of testcscockpit extension. Step2: Make entry of testcscockpit-spring-widgets.xml in web.xml file as below. Step3: Add widget to CS Order browser bean of testcscockpit-web-spring.xml as below. Add below line in the CsOrderBrowser bean inside map tag

 <entry key="testOrderWidget" value     ref="testcscockpitOrderWidgetConfig"/>
     

Step4: Adding Position of the widget Add below line in the CsOrderBrowser bean inside widgetFocusOrder tag. Main Column testOrderWidget

Step5: Create testOrderLayout.zul in the below Directory /testcscockpit/templates/ Copy content from defaultOrderLayout.zul and add it to testOrderLayout.zul . Add below line in testOrderLayout.zul, inside div id csMainContent

Step7: Creating renderer class for the Custom Test widget. Now we create a renderer class mentioned in custom widget . Renderer class extends OrderManagementActionsWidgetRenderer In renderer class we overrides createContentInternal method which returns HtmlBasedComponent component, which creates GUI. Class Name : TestOrderManagementActionsWidgetRenderer In the above renderer class custom button and action on those button is added.

Step8: Build your extension by perfort clean all

Step9: Start Hybris server and update your custom extension so added custom widget will get reflected inside order browser of the custom cscockpit.

Former Member
0 Kudos

I guess you need to make entries in 3 files - one is the updated zul file in your extension , one is the widget.xml with the widget code and one is the web.xml where you override the browserarea and then a buildcall back needs to be done to ensure the zul file is copied to the cockpit extension

Former Member
0 Kudos

So I done the following:

1.modified the web.xml to overwrite the Browser to add new widget 2.modified import xml 3.defined the new widget in the cockpit-widget.xml 4.run an update with ui_components.impex for the editor Can you please be more specific regarding the buildcall back ? Thanks

Former Member
0 Kudos

Hi Mihail,

Take a look at the following definition in subscriptioncockpits's buildcallbacks.xml

     <macrodef name="subscriptioncockpits_after_build">
         <sequential>
 
             <if>
                 <isset property="ext.cscockpit.path"/>
                 <then>
                     <echo level="info" message="subscriptioncockpits - Copying custom wizard to cscockpit..."/>
                      <copy todir="${ext.cscockpit.path}/web/webroot/cscockpit/templates" overwrite="true">
                         <fileset dir="${ext.subscriptioncockpits.path}/resources/subscriptioncockpits/cscockpit/zul">
                             <include name="**/**.*" />
                         </fileset>
                     </copy>
                     <copy todir="${ext.cscockpit.path}/web/webroot/cscockpit/css" overwrite="true">
                         <fileset dir="${ext.subscriptioncockpits.path}/resources/subscriptioncockpits/cscockpit/css">
                             <include name="**/**.*" />
                         </fileset>
                     </copy>
                 </then>
             </if>
 
         </sequential>
     </macrodef>

You need to do similar to this.

Former Member
0 Kudos

It is working now.Thank you very much for your answer!!