# Extending backend customer (new tab problem)

**URL:** https://forum.shopware.com/t/extending-backend-customer-new-tab-problem/46671
**Category:** International (English Only)
**Tags:** programming
**Created:** [3. Juli 2017 um 13:46 UTC](https://forum.shopware.com/t/extending-backend-customer-new-tab-problem/46671 "2017-07-03T13:46:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![irfanh94](https://avatars.discourse-cdn.com/v4/letter/i/8dc957/32.png) [@irfanh94](https://forum.shopware.com/u/irfanh94)
#### Post date: [3. Juli 2017 um 13:46 UTC](https://forum.shopware.com/t/extending-backend-customer-new-tab-problem/46671/1 "2017-07-03T13:46:40Z")

</div>

Hi folks.

When I do\*\*&nbsp;Ext.create(“Shopware.apps.PeCustomers.view.list.Markets”)\*\* in the part of code where I am putting list into the tab, 404 error came up, saying it cant find that path.

What should I do?

- **app.js**  
[https://image.ibb.co/d3m3vF/Screen\_Shot\_2017\_07\_03\_at\_15\_40\_13.png](https://image.ibb.co/d3m3vF/Screen_Shot_2017_07_03_at_15_40_13.png)  
&nbsp;
- **detail/window.js**  
[https://image.ibb.co/hxQDvF/Screen\_Shot\_2017\_07\_03\_at\_15\_41\_45.png](https://image.ibb.co/hxQDvF/Screen_Shot_2017_07_03_at_15_41_45.png)  
&nbsp;
- **list/markets.js**  
[https://image.ibb.co/ndqk9a/Screen\_Shot\_2017\_07\_03\_at\_15\_42\_42.png](https://image.ibb.co/ndqk9a/Screen_Shot_2017_07_03_at_15_42_42.png)  
&nbsp;
- **Errors**  
[https://image.ibb.co/cuChpa/Screen\_Shot\_2017\_07\_03\_at\_15\_44\_18.png](https://image.ibb.co/cuChpa/Screen_Shot_2017_07_03_at_15_44_18.png)

---

<div class="post-metadata">

### Author: ![simkli](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/simkli/32/13124_2.png) [@simkli](https://forum.shopware.com/u/simkli)
#### Post date: [3. Juli 2017 um 19:09 UTC](https://forum.shopware.com/t/extending-backend-customer-new-tab-problem/46671/2 "2017-07-03T19:09:06Z")

</div>

It looks like your&nbsp;list/markets.js isn’t embedded correctly. If a Ext.Js class is unknown, Shopware tries to load it via Ajax and that fails in your case. Please ensure that your ExtJs file is actually loaded **before** you try to create it (e.g. via {include file=…})&nbsp;or your extend the backend template also on any ajax Event (load)&nbsp;(with Ext.create(…)).

Have a look at&nbsp;

- the dependency loader&nbsp;[Backend extensions](https://developers.shopware.com/developers-guide/backend-extension/#loading-dependencies)
- the actions where you can to embed your files&nbsp;[Example #2: Custom components](https://developers.shopware.com/developers-guide/backend-extension/#example-%232:-custom-components)

Especially in your php-Event Listener:

```
if ($request->getActionName() == 'index') {
    // your extension is loaded. Just embed the app.js (in which all subfiles should be 
    // included via {include file=...})
    $view->extendsTemplate('backend/swag_extend_customer/app.js');
}

if ($request->getActionName() == 'load') {
    // dependency loader. Make sure to list *all* parts of your extension here except the
    // app.js
    $view->extendsTemplate('backend/swag_extend_customer/view/detail/window.js');
}

```

&nbsp;Hope I could help&nbsp; ![Wink](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/b3785da0cbf2c8566cb535dcf55b2730b5224899.png "Wink")

---

<div class="post-metadata">

### Author: ![irfanh94](https://avatars.discourse-cdn.com/v4/letter/i/8dc957/32.png) [@irfanh94](https://forum.shopware.com/u/irfanh94)
#### Post date: [4. Juli 2017 um 06:40 UTC](https://forum.shopware.com/t/extending-backend-customer-new-tab-problem/46671/3 "2017-07-04T06:40:57Z")

</div>

Where should I include list/markets.js file? In app.js or somwhere else?

Here is installation file of plugin:  
[https://image.ibb.co/iiUVua/Screen\_Shot\_2017\_07\_04\_at\_08\_39\_02.png](https://image.ibb.co/iiUVua/Screen_Shot_2017_07_04_at_08_39_02.png)

---

<div class="post-metadata">

### Author: ![irfanh94](https://avatars.discourse-cdn.com/v4/letter/i/8dc957/32.png) [@irfanh94](https://forum.shopware.com/u/irfanh94)
#### Post date: [4. Juli 2017 um 07:20 UTC](https://forum.shopware.com/t/extending-backend-customer-new-tab-problem/46671/4 "2017-07-04T07:20:24Z")

</div>

I got it! Thank you!
