# 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:** 1
**Showing post:** 2

<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")

---

_[View the full topic](https://forum.shopware.com/t/extending-backend-customer-new-tab-problem/46671)._
