Usage
After installing the Meteor Admin SDK, you can use it in your extensions. Most extensions should use the NPM package with a bundler such as Vite. This provides proper dependency management, type support, and better integration with modern development workflows.
Show a notification
One of the simplest SDK interactions is showing a notification in the Shopware Administration:
// import notification toolkit from the SDK
import { notification } from '@shopware-ag/meteor-admin-sdk';
// dispatch a new notification
notification.dispatch({
title: 'My first notification',
message: 'This was really easy to do'
});Add a UI extension
Use UI APIs to place your extension inside existing Administration views:
import { ui } from '@shopware-ag/meteor-admin-sdk';
ui.componentSection.add({
component: 'card',
positionId: 'sw-product-properties__before',
props: {
title: 'Extra product details',
locationId: 'product-extra-details'
}
});See Component Sections and Locations for the full flow.
Read Administration context
Use context APIs when your extension needs information about the current Administration session:
import { context } from '@shopware-ag/meteor-admin-sdk';
const language = await context.getLanguage();
console.log(language.languageId);See the Context API reference for all available methods.
Subscribe to data changes
Use data APIs when your extension should react to entity changes in the current view:
import { data } from '@shopware-ag/meteor-admin-sdk';
data.subscribe('sw-product-detail', (payload) => {
console.log('Product data changed', payload);
});See Subscribe, Get, and Repository for more data access patterns.
Find more examples
For more complete examples and API details, continue with: