Skip to content
Tutorials Center
My learning

Topics

Shopware Plugin Development Tutorial

Learn Shopware Plugin Development step by step: 30 lessons in 10 chapters with examples, quizzes, diagrams and projects.

Start learning →

of lessons completed

Getting Started

  1. 1 What Is Shopware 6? Learn what Shopware 6 is, how its Symfony, Twig and Vue stack fits together, and when to build a plugin, an app or a theme for your own shop.
  2. 2 Setting Up a Development Environment Set up a local Shopware 6 shop for plugin development: Docker or a native stack, composer create-project, system:install, debug mode and watch scripts.
  3. 3 Your First Plugin Build a minimal Shopware 6 plugin: composer.json, the Plugin base class, plugin:refresh, plugin:install --activate and a subscriber that says hello.

Architecture

  1. 4 Services and the Dependency Injection Container Learn how Shopware plugins define services in services.xml, use tags, and decorate core services with the Symfony container, with a runnable mini container.
  2. 5 Plugin Structure and Lifecycle Understand the Shopware 6 plugin folder layout and the install, update, activate, deactivate and uninstall hooks, including keepUserData and update migrations.
  3. 6 Plugin Configuration Add settings to a Shopware 6 plugin with config.xml, read them with SystemConfigService per sales channel, use them in Twig and validate the values.

Data Abstraction Layer

  1. 7 Custom Entities and Definitions Learn how the Shopware Data Abstraction Layer describes data with EntityDefinition, field flags, Entity and EntityCollection classes, and the services.xml tag.
  2. 8 Database Migrations Create tables for your plugin with Shopware migrations: MigrationStep, timestamps, update versus destructive phases, running commands and safe rollbacks.
  3. 9 Reading and Writing with Repositories Read and write data in Shopware with the DAL: Criteria filters, sorting, limits, associations, aggregations, search vs searchIds, upsert, delete and Context.
  4. 10 Entity Extensions and Custom Fields Add data to Shopware core entities safely: EntityExtension with new fields and associations, custom field sets, translated fields and how to choose.

Events, Flows and Background Work

  1. 11 Subscribers and Core Events React to Shopware with event subscribers: EventSubscriberInterface, entity written and loaded events, page loaded events, priorities and how to avoid slow side effects.
  2. 12 Flow Builder: Triggers and Custom Actions Understand Shopware Flow Builder triggers, conditions and actions, and write a custom FlowAction with aware interfaces, registration and an admin form.
  3. 13 Scheduled Tasks and the Message Queue Run recurring and background work in Shopware 6: ScheduledTask classes, handlers, Messenger messages, workers, retries and idempotent jobs, with PHP stand-ins.

APIs

  1. 14 Custom Store API Routes Build a custom Shopware 6 Store API route with the abstract route pattern, getDecorated(), sales channel context, responses and cache invalidation.
  2. 15 The Admin API and Integrations Call the Shopware 6 Admin API from other systems: integrations with client credentials, search criteria in JSON, the bulk sync API and batching advice.
  3. 16 Apps, Webhooks and Signatures Understand the Shopware app system: manifest.xml, the registration handshake, webhook events, HMAC signature checks, retries and idempotent handlers.

Storefront

  1. 17 Storefront Templates with Twig Customize the Shopware 6 storefront with Twig: sw_extends, block overrides with parent(), sw_include and page-loaded subscribers that add your data to a page.
  2. 18 Styling and JavaScript in the Storefront Style and script the Shopware 6 storefront: theme.json, SCSS variable overrides, JavaScript plugins bound to data attributes, build commands and accessibility.

Administration

  1. 19 The Administration at a Glance Understand the Shopware 6 Administration: a Vue single-page app with modules, components, Twig templates, snippets and ACL, plus a runnable override registry stand-in.
  2. 20 Building an Admin Module Build a Shopware 6 admin module: register routes and navigation, write list and detail pages, save through the repository and handle privileges, with a runnable state model.

Quality and Production

  1. 21 Testing Plugins Test Shopware 6 plugins with PHPUnit unit and integration tests, test traits, database transactions, mocks and Jest for the admin, plus runnable test helpers.
  2. 22 Security and Performance Make Shopware plugins safe and fast: ACL, input validation, avoiding N+1 reads and unbounded associations, cache invalidation, indexers and queue limits, with runnable demos.
  3. 23 Packaging, Deployment and Updates Ship a Shopware plugin: composer.json metadata, zip builds, shopware-cli, deployment steps, update migrations and version compatibility, with a runnable constraint checker.

Projects

  1. 24 Project: Product Badges Build a Shopware 6 plugin that shows product badges: a custom field, a page subscriber, a Twig block, SCSS and color configuration, with runnable data-flow stand-ins.
  2. 25 Project: A Custom Wishlist API Build a wishlist for logged-in customers: a custom entity, a migration, a Store API route with validation and a JSON response, plus tests and runnable stand-ins.
  3. 26 Project: Order Export Task Build a scheduled task that pages through orders with the DAL, writes a safe CSV file, reads its target from plugin config and can be re-run without duplicates.
  4. 27 Project: Syncing Stock from an ERP Keep Shopware stock in step with an ERP: pull or push, map and validate rows, upsert in batches, retry safely, ignore stale updates and log every rejected row.

Practice and Review

  1. 28 Practice Exercises with Solutions Twelve graded Shopware plugin exercises with hints and solutions: container, decoration, tags, criteria, migrations, N+1, events, routes, config, Twig blocks and HMAC.
  2. 29 Shopware Interview Questions Prepare for a Shopware 6 developer interview: concise answers on architecture, the DAL, events, plugins versus apps, caching, security and deployment, with two runnable stand-ins.
  3. 30 Shopware Plugin Cheat Sheet A quick Shopware 6 plugin reference: bin/console commands, plugin directory layout, service tags, Criteria snippets, event names and the pitfalls that cost the most time.