Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update override-existing-javascript.md #1556

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions guides/plugins/plugins/storefront/override-existing-javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@ export default class MyCookiePermission extends PluginClass {
}
```


::: info
This does not work, if the plugin you want to override is an async plugin. Currently you need to import a third-party plugin like below.
:::

```javascript
import ThirdPartyPluginClass from '../../../../../../../../../vendor/store.shopware.com/thirdparty/src/Resources/app/storefront/src/plugin/third-party-js-plugin-dir/third-party-js.plugin';

export default class MyCookiePermission extends ThirdPartyPluginClass {
}
```

Now you can override the functions from the parent class.

### Always show the cookie bar
Expand Down