# how to add new item to analysis toolbar shopware backend?

**URL:** <https://forum.shopware.com/t/how-to-add-new-item-to-analysis-toolbar-shopware-backend/57742>\
**Category:** Shopware 5\
**Created:** [29. Januar 2019 um 13:11 UTC](https://forum.shopware.com/t/how-to-add-new-item-to-analysis-toolbar-shopware-backend/57742 "2019-01-29T13:11:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alirizvi](https://avatars.discourse-cdn.com/v4/letter/a/96bed5/32.png) [@alirizvi](https://forum.shopware.com/u/alirizvi)\
**Post date:** [29. Januar 2019 um 13:11 UTC](https://forum.shopware.com/t/how-to-add-new-item-to-analysis-toolbar-shopware-backend/57742/1 "2019-01-29T13:11:21Z")

</div>

I want to add a new item in analysis window toolbar via extjs like this&nbsp;[Screenshot by Lightshot](https://prnt.sc/mdqqjc)

but still I cant see the results

here is my code

swag\_custom\_statistics/backend/view/main/voucher.js  
//{namespace name=backend/analytics/view/main}  
//{block name=“backend/analytics/swag\_custom\_statistics/view/main/voucher”}  
Ext.define(‘Shopware.apps.Analytics.swagCustomStatistics.view.main.Voucher’, {  
&nbsp; &nbsp; extend: ‘Shopware.apps.Analytics.view.main.Toolbar’,  
&nbsp; &nbsp; alias: ‘widget.voucher-analytics-toolbar’,  
&nbsp; &nbsp; initComponent: function () {  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;var me = this;  
&nbsp; &nbsp; &nbsp; &nbsp; Ext.applyIf(me, {  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; items: [  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;xtype: ‘button’,  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;text: ‘{s name=toolbar/export}Export2{/s}’,  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;name: ‘export2’,  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;iconCls: ‘sprite-drive-download’,  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;handler: function () {  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;me.fireEvent(‘exportCSV’);  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;}  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;},  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;]  
&nbsp; &nbsp; &nbsp; &nbsp; });  
&nbsp; &nbsp; &nbsp; &nbsp; me.callParent(arguments);  
&nbsp; &nbsp; }  
});  
//{/block}

swag\_custom\_statistics/app.js

&nbsp;

// {block name=“backend/analytics/application”}  
// {$smarty.block.parent}

// {include file=“backend/analytics/swag\_custom\_statistics/store/navigation/voucher.js”}  
// {include file=“backend/analytics/swag\_custom\_statistics/view/table/voucher.js”}  
// {include file=“backend/analytics/swag\_custom\_statistics/view/main/voucher.js”}  
// {/block}  
&nbsp;
