# \[GELÖST\] Liste des Backend-Moduls "Versandkosten" erweitern

**URL:** https://forum.shopware.com/t/gelost-liste-des-backend-moduls-versandkosten-erweitern/32038
**Category:** Programmierung
**Created:** [7. November 2015 um 14:06 UTC](https://forum.shopware.com/t/gelost-liste-des-backend-moduls-versandkosten-erweitern/32038 "2015-11-07T14:06:50Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sschreier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sschreier/32/23296_2.png) [@sschreier](https://forum.shopware.com/u/sschreier)
#### Post date: [7. November 2015 um 14:06 UTC](https://forum.shopware.com/t/gelost-liste-des-backend-moduls-versandkosten-erweitern/32038/1 "2015-11-07T14:06:50Z")

</div>

Hallo liebe Shopware - Gemeinde,

ich würde gerne ein weiteres Feld in der Listenansicht von „Einstellungen“ -\> „Versandkosten“ hinzufügen. Leider bringt es mir einen ExtJs-Fehler (TypeError: c[b/].setSortState is not a function).

Folgenden Code habe ich schon am Beispiel der ID.

**Bootstrap.php:**

```
 private function subscribeEvents(){ $this-\>subscribeEvent( 'Enlight\_Controller\_Action\_PostDispatch\_Backend\_Shipping', 'onBackendShippingPostDispatch' ); } public function onBackendShippingPostDispatch(Enlight\_Event\_EventArgs $args){ $controller = $args-\>getSubject(); $request = $controller-\>Request(); $response = $controller-\>Response(); $view = $controller-\>View(); $this-\>Application()-\>Snippets()-\>addConfigDir($this-\>Path() . 'Snippets/'); $view-\>addTemplateDir($this-\>Path() . 'Views/'); if ($args-\>getRequest()-\>getActionName() === 'load') { $view-\>extendsTemplate('backend/shipping/view/attributeshipping/main/list.js'); } } 

```

**list.js:**

```
 // File location: AttributeShipping/Views/backend/shipping/view/attributeshipping/main/list.js //{block name="backend/shipping/view/main/list" append} /\*{namespace name="backend/shipping/view/main/list"}\*/ Ext.define('Shopware.apps.Shipping.view.attributeshipping.main.List', { override: 'Shopware.apps.Shipping.view.main.List', initComponent: function() { var me = this; var columns = me.callOverridden(arguments); var columnIdField = { header: '{s name=shipping\_grid\_id}ID{/s}', dataIndex : 'dispatch.id', renderer: me.idColumn }; return Ext.Array.insert(columns, 0, [columnIdField]); }, idColumn : function (value, metaData, record) { return record.get('id'); } }); //{/block} 

```

Testweise habe ich das ID-Feld in die themes\Backend\ExtJs\backend\shipping\view\main\list.js eingefügt, und da funktioniert es. Ich finde bisher aber nicht den Fehler. Hat jemand eine Idee?

Beste Grüße

Sebastian

---

<div class="post-metadata">

### Author: ![EikeBrandtWarneke](https://avatars.discourse-cdn.com/v4/letter/e/cdc98d/32.png) [@EikeBrandtWarneke](https://forum.shopware.com/u/EikeBrandtWarneke)
#### Post date: [7. November 2015 um 14:16 UTC](https://forum.shopware.com/t/gelost-liste-des-backend-moduls-versandkosten-erweitern/32038/2 "2015-11-07T14:16:14Z")

</div>

Aus meiner Wühlkiste: ` /\*\* \* Aquatuning Software Development - Miscellaneous - Backend \* \* @category Aquatuning \* @package Shopware\Plugins\AtsdMiscellaneous \* @copyright Copyright (c) 2013, Aquatuning GmbH \*/ // {namespace name="backend/atsd\_miscellaneous/shipping/app"} // {block name="backend/shipping/view/main/list" append} Ext.define( "Shopware.apps.Shipping.view.AtsdMiscellaneous.main.List", { // override override: "Shopware.apps.Shipping.view.main.List", // init override initComponent : function() { // get this var me = this; // call the parent me.callParent( arguments ); // get the columns var columns = Ext.clone( me.columns ); // remove last element delete columns[columns.length - 1]; // create title column var column\_title = Ext.create( 'Ext.grid.column.Column', { header:'Interner Titel', dataIndex: 'attribute.atsdMiscellaneousTitle', renderer: me.titleColumn, width:250 } ); // add the column columns.unshift( column\_title ); // create id column var column\_id = Ext.create( 'Ext.grid.column.Column', { header:'ID', dataIndex: 'id.name', renderer: me.idColumn, sortable: false, width:50 } ); // add the column columns.unshift( column\_id ); // overwrite the action column var column\_actions = { header: '', xtype : 'actioncolumn', width : 80, items : [/\* {if {acl\_is\_allowed privilege=delete}} \*/ { iconCls : 'sprite-minus-circle-frame', action : 'delete', cls : 'dispatchDelete', tooltip : 'Versandart löschen' }, /\* {/if} \*/ /\* {if {acl\_is\_allowed privilege=update}} \*/ { iconCls : 'sprite-pencil', cls : 'editButton', tooltip : 'Versandart editieren' }, /\* {/if} \*/ /\* {if {acl\_is\_allowed privilege=create}} \*/ { iconCls :'sprite-blue-document-copy', cls :'cloneButton', tooltip :'Versandart kopieren', style : 'width: 16px; height: 16px' } /\* {/if} \*/] }; // and add it columns.push( column\_actions ); // reconfigure the store me.reconfigure( me.store, columns); }, // internal title renderer titleColumn: function (value, metaData, record) { return "**" + record.get( "atsdMiscellaneousTitle" ) + "**"; }, // name renderer nameColumn : function (value, metaData, record) { return record.get( "name" ); }, // id renderer idColumn : function (value, metaData, record) { return record.get( "id" ); }, // add a search createToolbar: function() { // get this var me = this; // create default items var items = [/\*{if {acl\_is\_allowed privilege=delete}}\*/ { iconCls : 'sprite-plus-circle', text : 'Versandart hinzufügen', action : 'addShipping' }, /\* {/if} \*/ /\*{if {acl\_is\_allowed privilege=delete}}\*/ { iconCls : 'sprite-minus-circle', text : 'Versandart löschen', disabled : true, action : 'deleteShipping' }, /\* {/if} \*/ "-\>", { xtype:'textfield', name:'searchfield', cls:'searchfield', width: 150, emptyText:'Suche...', enableKeyEvents:true, checkChangeBuffer:500, listeners: { change: { fn: function(field, value) { // go to 1st page me.store.currentPage = 1; // trim the search value var search = Ext.String.trim( value ); // set the search parameter me.store.getProxy().extraParams.search = search; // and reload the store me.store.load(); } } } }]; // return the toolbar return Ext.create('Ext.toolbar.Toolbar', { dock:'top', ui: 'shopware-ui', items: items } ); } }); // {/block} ` Viele Grüße

---

<div class="post-metadata">

### Author: ![sschreier](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/sschreier/32/23296_2.png) [@sschreier](https://forum.shopware.com/u/sschreier)
#### Post date: [7. November 2015 um 14:21 UTC](https://forum.shopware.com/t/gelost-liste-des-backend-moduls-versandkosten-erweitern/32038/3 "2015-11-07T14:21:52Z")

</div>

Hallo Aquatuning GmbH, ich danke dir, ich hab die Zeilen gefunden, die mir fehlten. Beste Grüße Sebastian

---

<div class="post-metadata">

### Author: ![Nuadur](https://avatars.discourse-cdn.com/v4/letter/n/ac8455/32.png) [@Nuadur](https://forum.shopware.com/u/Nuadur)
#### Post date: [8. März 2018 um 07:01 UTC](https://forum.shopware.com/t/gelost-liste-des-backend-moduls-versandkosten-erweitern/32038/4 "2018-03-08T07:01:55Z")

</div>

Hi

&nbsp;

Könntest du eventuell die Zeile die fehlte einmal posten? Ich habe ein ähnliches Problem und komme nicht weiter.

Danke
