Markus Michalski FAQ

Empty Category Messages

Custom 'No Products' messages and images per category for Shopware 6.7 with optional inheritance from the parent category.

Deutsche Version

Back to Shopware 6 Plugins

Empty Category Messages

GitHub
CI
License
Shopware
PHP

This documentation always refers to the latest released version.

Live Demo: Try this and other plugins live — no installation, no risk: demo.markus-michalski.net

Overview

With this plugin you store your own "No Products" text, with an optional image, for each category. It appears instead of the default Shopware message when a category's product listing is empty. Setup happens through custom fields directly in the category, and subcategories can inherit the text of the parent category.

The plugin needs no global settings: you maintain text, image, size, alignment and CSS classes per category in the Admin under Catalogues > Categories.

graph LR
    A["Category custom fields"] --> B["CategoryPageSubscriber loads parent chain and media"]
    B --> C["Listing template"]
    C --> D["Twig function mmd_empty_category_message"]
    D --> E["EmptyCategoryMessageService"]
    E --> F{"Message found?"}
    F -->|"Yes"| G["Custom message in the storefront"]
    F -->|"No"| H["Shopware default message"]

Documentation

Page Content
Installation Installation, update, uninstallation
Configuration Fields per category, inheritance, practical examples
Storefront HTML structure, CSS classes, image, custom styling
Extending Twig function, returned object, template blocks
Troubleshooting Common problems, known limitations
Technical Details Flow, building blocks, custom fields, security

Features

Feature Description
Custom messages HTML message per category when no products are available
Image Optional image from the media manager, for example a sad smiley
Image size Small (150px), Medium (250px) or Large (400px)
Alignment Separate alignment for image and text: left, center, right
CSS classes Custom CSS classes for individual styling
Inheritance Optionally take over the message of the parent category, up to 10 levels including the category itself
Multilingual Image alt text in German and English
CSP compatible No inline styles, all styling through CSS classes

Requirements

Requirement Version
Shopware ~6.7.0
PHP >=8.2
Composer package mmd/sw67-empty-category

License

This plugin is released under the GPL-3.0-or-later (GNU General Public License, version 3 or later). See LICENSE for details.

Support

For customers who purchased this plugin through the Shopware Store, technical support is provided exclusively through the official Shopware support ticket system in your Shopware account. For general, project-related, or commercial inquiries outside the scope of the Store framework, you can reach me at support@markus-michalski.net.