Quickstart Guide
This guide will walk you through creating a basic admin app that extends the Shopware 6 Administration. You’ll learn how to set up the SDK, register UI extensions, and display content in the admin interface.What You’ll Build
In this tutorial, you’ll create a simple admin app that:- Adds a custom menu item to the administration
- Displays a card on the dashboard
- Shows a notification when loaded
Install the Admin SDK
Install the SDK using npm:Or use the CDN version by adding this script tag to your HTML:
Initialize Your App
Create a
main.js file that checks the location context and initializes your app:The Admin SDK uses two types of iframes:
- Main Hidden: A hidden iframe where you register all extension points
- Location iframes: Visible iframes that render UI for specific locations
Understanding the Code
Location Context
The Admin SDK uses different iframe contexts:-
location.MAIN_HIDDEN: A hidden iframe that runs when the administration loads. This is where you register all your extension points (menu items, tabs, cards, etc.). - Location iframes: Visible iframes that display your actual UI components. Each location you define gets its own iframe.
Extension Points
You registered two types of extensions:- Menu Item (
ui.menu.addMenuItem): Adds an entry to the main navigation - Component Section (
ui.componentSection.add): Adds a card to an existing page position
locationId that identifies where your content should be rendered.
What’s Next?
Working with Data
Learn how to read and write Shopware entities
Custom Modules
Explore all available UI extension points
CMS Extensions
Create custom CMS elements for Shopping Experiences
Full Example App
Check out the complete example app in the repository
Troubleshooting
My app doesn't appear in the administration
My app doesn't appear in the administration
- Verify your manifest.xml is correctly configured
- Check that your development server is running
- Ensure the app is installed and activated in Shopware
- Check the browser console for any errors
Extension points aren't registering
Extension points aren't registering
- Make sure your code runs in the
MAIN_HIDDENlocation - Verify that you’re importing the SDK correctly
- Check that positionIds match existing admin positions
Location content isn't rendering
Location content isn't rendering
- Confirm your locationId matches what you registered
- Use
location.get()to verify the current location - Check browser console for any JavaScript errors