How to use TypeScript in your Shopware Plugins

In StackOverflow’s 2020 Developer Survey TypeScript surpassed Python as most loved language and is now in place two. And this is not without reason. TypeScript adds type definitions to JavaScript, which is great for larger codebases, scaling and not despairing...

Changing the template loading order

This problem popped up on  Slack a few times and I was confronted with it on a recent project: when the views property in the theme.json file specifies that the theme should be searched for templates first, a plugin cannot...

Shopware 6 and the plugin migration

I am near the end of converting my Shopware 5 plugins to the new version 6 codebase and after digging through the new systems, now seems like a good time to reflect on the transition. In Shopware 5 the move...

How to find the right event

Changing the program flow or modifying data are common tasks for plugins. Shopware provides many events to subscribe to, which makes it very extendable, but also adds complexity. So, how to find the event that is right for you? Of...

Working with the http cache

A http cache is indispensable when a web app has reached a certain complexity or traffic. But caching also means that the data is probably not up to date when presenting it to website visitors. This post will show one...