Product Custom Inputs
Configurable per-product input fields for Sylius - eight field types, validation, display in cart, checkout and customer account, Shop API for headless clients
Product Custom Inputs
This documentation always describes the latest published version.
Overview
Product Custom Inputs lets you define any number of input fields per product in the admin, which customers fill in when adding the product to the cart. A field has a label, a placeholder, a required flag and type-specific limits (length, value range, date range, select options). The input belongs to the specific order item and stays visible through cart, checkout, order confirmation, the customer account and the admin order view.
Typical uses: an individual URL on a plugin product, the name to embroider on a quilt, a preferred delivery date or a size choice.
No session detour: A Sylius cart is an order in the "cart" state. Values are therefore stored directly on the order item, without any interim storage.
graph LR
A["Admin: define field"] --> B["Attach field to product"]
B --> C["Storefront: add-to-cart form"]
B --> D["Shop API: POST custom-inputs"]
C --> E["Value on order item"]
D --> E
E --> F["Display: cart, checkout, account, admin"]
Documentation
| Page | Content |
|---|---|
| Installation | Installation, setup command, update, uninstall |
| Configuration | Field types, admin interface, attaching fields to products, practical examples |
| Storefront | Add-to-cart form, display hooks, template override |
| Shop API | Endpoints, request examples, error format |
| Extending | Twig function, hooks, repositories, menu group |
| Troubleshooting | Symptoms, known limitations, FAQ |
| Technical | Architecture, entities, tables, migrations, tests |
Features
| Feature | Description |
|---|---|
| Eight field types | Single-line text, multi-line text, number, checkbox, date, time, date and time, select |
| Reusable fields | A field is defined globally and can be attached to multiple products |
| Translatable | Label and placeholder per locale |
| Type-specific validation | Length, min/max, step, date and time limits, disabled days, select options |
| Displayed everywhere | Cart, checkout sidebar, order summary, customer account and admin order |
| Dual-mode | Storefront form and Shop API for headless clients |
| Kill switch | Shop-wide switch in the admin to turn the plugin off |
Requirements
| Requirement | Version | Notes |
|---|---|---|
| PHP | ^8.3 | |
| Sylius | ^2.2 | Tested against Sylius 2.2 and 2.3 |
| Symfony | ^7.4 | |
| API Platform | ^4.2.1 or ^5.0 | CI tests both major versions against both Sylius minors |
| Twig | ^3.16 |
License
Commercial license: one Sylius installation per license (all channels plus development and staging environments), no redistribution, updates for 12 months from purchase.
Support
Email: support@markus-michalski.net