Contact Requests
Stores every message from the Sylius contact form in addition to the e-mail, in the shop and through the Shop API. Searchable in the admin, with a command to delete old requests and an admin-authenticated API.
Contact Requests
This documentation always describes the latest published version.
Live Demo: Try this and other plugins live — no installation, no risk: demo.markus-michalski.net
Overview
Sylius' built-in contact form sends a request by e-mail only. If that mail gets lost, is caught by a spam filter or bounces, the request is gone. This plugin also stores every request in the database. You don't have to change your theme or the mail sending for that.
The request is stored before the e-mail goes out. If sending the mail fails, the request is still kept. If storing fails, the e-mail is still sent. Neither side blocks the other.
graph LR
A["Twig contact form"] --> C["PersistingContactEmailManager"]
B["Shop API SendContactRequest"] --> C
C --> D["Store ContactRequest"]
C --> E["E-mail sending as before"]
D --> F["Admin list + Admin API"]
Documentation
| Page | Content |
|---|---|
| Installation and Operation | Installation, update, deleting old requests regularly, uninstall |
| Configuration | Admin interface, list view, practical examples |
| Admin API | REST API with admin authentication |
| Troubleshooting and FAQ | Common problems, known limitations, frequently asked questions |
| Technical Details | Architecture, plugin structure, database table |
Features
| Feature | Description |
|---|---|
| Automatic storing | Every request from the contact form in the shop and through the Shop API is stored. You don't have to change your theme or frontend. |
| Admin overview | Searchable, sortable list under Admin → MMKreativ Plugins → Contact Requests |
| Detail view | Name, e-mail, subject, message, consent and timestamp of every request |
| Failure-safe storing | If storing fails, only the kind of error is logged, never the message text. The e-mail is sent in any case. |
| Command to delete old requests | mmd:contact-requests:purge --older-than=<days> permanently deletes old requests |
| Setup command | mmd:contact-requests:setup creates only this plugin's table and can safely be run again after every composer update |
| Admin API | Read-only REST API with admin authentication, for example for your own reporting |
Requirements
| Requirement | Version | Notes |
|---|---|---|
| Sylius | ^2.2 | Tested against Sylius 2.2 and 2.3 |
| PHP | ^8.3 | |
| Database | MySQL/MariaDB | PostgreSQL is not supported. The migration is MySQL DDL and is skipped without an error on other platforms, so the table simply doesn't exist there. |
License
Commercial license: one license covers one Sylius installation (all channels, plus its development and staging environments). Redistribution is not allowed, updates are included for 12 months from purchase. Parts of the project scaffolding (test application, tooling configuration) come from Sylius/PluginSkeleton (MIT) and keep that license.
Support
For license questions, technical questions or bugs, reach me at support@markus-michalski.net.