Order Attributes
v1.8.2
Order Attributes
- Updates and support included for 12 months
- License key delivered immediately by email
- 30-day money-back guarantee
- Full documentation included
- Composer-ready installation
Order Attributes
Capture the extra information your customers need to give you at checkout — a purchase-order reference, a project code, an uploaded PO document, a delivery date — and carry it all the way through to the order, the admin, the confirmation email and the PDF invoice. Wimakeit Order Attributes injects configurable custom fields into the checkout, stores their values on the order, and surfaces them everywhere your team looks.
Built as a clean, theme-agnostic core for Magento 2.4 / Mage-OS, the module ships the full data layer (EAV + flat quote storage + junction tables for scoping), a secure file-upload endpoint serving files from outside the web root, and a complete admin section to manage attributes without touching code.
Who it's for
- B2B merchants who need a customer PO reference, buyer code or project number on every order before they invoice
- Stores that must collect a document (PDF, image) from the customer at the moment of purchase
- Merchants who want extra checkout fields configurable from the admin — without paying for an Amasty / Mageworx / Aheadworks subscription
- Teams migrating off the legacy Amasty Order Attribute integration that shipped with the old Luma stack
Key benefits
- Full admin CRUD section — manage attributes from the admin under Wimakeit > Order Attributes: create, edit, enable / disable, sort, mass-delete. No more editing patches in code or tables in MySQL.
- Nine input types out of the box — text, textarea, number, select, multiselect, date, file upload, checkbox, radio. Options for select / multiselect / radio / checkbox are entered as a JSON array of
{value,label}objects on the attribute form. - Per-store + per-customer-group scope — multiselects on the admin form, backed by junction tables (
wimakeit_order_attribute_store_view,wimakeit_order_attribute_customer_group). Leave empty to apply everywhere. - Secure file uploads — stored under
var/(outside the web root), guarded by CSRF form-key validation, MIME / magic-number checks via finfo, deny-PHP.htaccesson the upload tree, per-attribute extension allow-list and size cap. Files are streamed by a dedicated download controller with customer ↔ order ownership check (frontend) orsales_orderACL (admin). - Visible everywhere it matters — values flow into the admin sales order grid (filterable / searchable when flagged), the order view, the PDF invoice, the confirmation email — controlled per attribute via Show in … flags.
- Sensible defaults seeded for you — a data patch creates two ready-to-use attributes (
wmi_ref_bon_commande,wmi_file_bon_commande) onsetup:upgrade, so the module works out of the box. - Clean, theme-agnostic core — for a Hyvä storefront, pair it with
wimakeit/module-order-attributes-hyvafor the Alpine-driven checkout section.
Compatibility
- Magento 2.4.x / Mage-OS equivalent
- PHP 8.1, 8.2, 8.3, 8.4
- Depends on Magento sales, checkout, quote, customer and eav modules
- Theme-agnostic core; Hyvä checkout rendering via the companion Hyvä package
Install this module via Composer. Make sure your auth.json is configured with your Wimakeit credentials.
$ composer require wimakeit/module-order-attributes:^1.8.2
$ bin/magento setup:upgrade
$ bin/magento setup:di:compile
Installation notes
The standard composer require + setup:upgrade + setup:di:compile flow applies. The points below cover what's specific to this module.
composer require wimakeit/module-order-attributes
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
Dependencies
No third-party or Wimakeit dependencies. The module depends only on Magento core modules:
magento/module-salesmagento/module-checkoutmagento/module-quotemagento/module-customermagento/module-eav
Requires PHP 8.1+ (tested up to 8.4) and Magento 2.4.x / Mage-OS equivalent. For a Hyvä storefront, install the companion package wimakeit/module-order-attributes-hyva for the Alpine-driven checkout section.
Admin section
The full attribute management lives in the admin under Wimakeit > Order Attributes > Manage Attributes. The grid lists every configured attribute with inline edit / delete and mass actions (delete, enable, disable). The form lets you set every behaviour flag — no system config screen needed.
ACL resources
| Resource | Default scope | Purpose |
|---|---|---|
Wimakeit_OrderAttributes::orderattributes | Parent — admin role tree | Wraps the Order Attributes menu group |
Wimakeit_OrderAttributes::attribute | Child | Required to view / edit attributes via the admin grid + form |
Grant Wimakeit_OrderAttributes::attribute to any admin role that should manage attributes. The admin file-download controller piggy-backs on the standard Magento_Sales::sales_order ACL — any admin who can view an order can download its attached files.
Default attributes seeded on setup:upgrade
The data patch SeedDefaultAttributes runs at install time. It (1) creates an EAV attribute on sales_order so the value lands on the order, with grid-sync flags wired through SalesSetupFactory, and (2) inserts a config row in wimakeit_order_attribute. The patch is idempotent — re-running setup:upgrade skips any attribute that already exists, so it never overwrites admin edits.
| Attribute code | Type | Required | Step | Show in grid | Show in PDF | Show in email |
|---|---|---|---|---|---|---|
wmi_ref_bon_commande | text | No | Order Summary | Yes | Yes | Yes |
wmi_file_bon_commande | file | No | Order Summary | No | No | No |
Adding new text-, number- or select-typed attributes after install requires no further schema work — the value lands in the wimakeit_quote_attribute_value junction added in 1.2.0, then copies to the order EAV at submit time. Only when you add a brand-new file-typed attribute do you also need an admin upload UI in your storefront theme.
Storage layout
| Table | Purpose |
|---|---|
wimakeit_order_attribute | Attribute configuration rows (label, type, flags, validation) |
wimakeit_order_attribute_store | Per-store label / placeholder / help override |
wimakeit_order_attribute_store_view (since 1.3.0) | Store-view visibility scope. Empty = applies everywhere |
wimakeit_order_attribute_customer_group (since 1.3.0) | Customer-group visibility scope. Empty = applies everywhere |
wimakeit_quote_attribute_value (since 1.2.0) | Per-(quote × attribute_code) captured value during checkout |
sales_order (EAV) | Final value once the order is placed |
The legacy CSV column wimakeit_order_attribute.customer_groups is kept for back-compat / rollback and will be dropped in a future release. A migration patch copies pre-1.3.0 CSV values into the customer-group junction at upgrade.
File upload endpoint
file-typed attributes upload through a dedicated storefront route — frontName wimakeit_orderattributes, controller Upload/Index (HTTP POST only). The Hyvä checkout section POSTs the picked file plus its attribute_code as multipart/form-data; the endpoint returns a server-generated identifier the place-order JS submits as the attribute value.
Storage path (since 1.1.0):
Uploaded bytes are stored under var/wimakeit/order_attributes/tmp/<identifier> (outside the web root) and promoted to var/wimakeit/order_attributes/orders/<increment_id>/ once the order is placed. Files are never web-accessible — they are streamed by the dedicated download controller (frontend: customer ↔ order ownership check; admin: Magento_Sales::sales_order ACL).
Endpoint hardening (no configuration needed):
- CSRF: the
form_keyis validated on every request. - Cart session required (no anonymous open-bucket uploads).
- Extension allow-list pulled from the attribute config (falls back to
pdf, jpg, jpeg, png). - MIME / magic-number check via
finfoafter save — files whose magic bytes don't match the declared extension are deleted. - Size cap from the attribute config (
max_file_size_kb, default 5120 KB). - Random, unguessable file identifiers.
- Deny-PHP
.htaccessdropped into the upload tree on first write (Apache mitigation belt-and-braces for thevar/storage). - Path-traversal hardening in the promote-to-order observer (strips
../,..\\, NUL before the prefix check).
1.0.x → 1.1.0+ migration of existing uploads
For sites that ran 1.0.x and accumulated uploaded files in pub/media/wimakeit/order_attributes/, the 1.1.0 release ships a one-shot CLI command that moves the bytes into var/ and rewrites the order column. Idempotent — re-runnable safely.
bin/magento wimakeit:order-attributes:migrate-uploads --dry-run # preview
bin/magento wimakeit:order-attributes:migrate-uploads # apply
bin/magento wimakeit:order-attributes:migrate-uploads --limit=500 # batch
Cache type
The attribute configuration is cached under the tag wmi_order_attribute (since 1.1.1). After bulk DB edits or imports, flush with:
bin/magento cache:clean wmi_order_attribute
Admin save / delete / mass-status operations invalidate the cache automatically.
No Stores > Configuration section
This module deliberately has no Stores > Configuration admin section. All behaviour is set per-attribute through the Wimakeit > Order Attributes admin grid. The few global knobs that would have lived in system config (default file extensions, default size cap) are instead exposed as defaults in the attribute form.
- Version
- v1.8.2
- Support
- 12 months
- Last updated
- Aug 28, 2026
- Magento
- Magento 2.4.4 Magento 2.4.5 Magento 2.4.6 Magento 2.4.7 Mage-OS 2.0 Mage-OS 2.1
- PHP
- PHP 8.1 PHP 8.2 PHP 8.3
- Hyvä
- Not compatible
- Package
-
wimakeit/module-order-attributes
Compatibility checker
Pick your stack to see if this module fits.
Categories: Security, Feature, Fix, Perf, Admin, Deps.
[1.3.6] - 2026-06-08
Fix
- Admin UI grids no longer break with
Not registered handle <x>_data_sourceaftersetup:di:compile. The order-attributes grid'sCollectionFactorycollectionsbinding moved frometc/adminhtml/di.xmlto globaletc/di.xmlso it merges with the rest of the admin grids instead of replacing them.
[1.3.5] - 2026-06-08
Fix
- Guest checkout no longer fatals with a
TypeError. ThePaymentInformationManagementPluginwas split into two classes pointing at the right interfaces (logged-in vs guest), so Magento dispatchesbefore<Method>to the correct subject signature.
[1.3.4] - 2026-06-05
Fix
setup:upgradeno longer fails with "DDL statements are not allowed in transactions" when the default-attributes patch first applies. The patch now opts out of the wrapping transaction so the grid-sync DDL onsales_order_gridcan run.
[1.3.3] - 2026-06-05
Fix
- Edit attribute form renders again. A bad dynamic-rows configuration on the Options fieldset was throwing a KO binding error at form init and leaving every section blank. Options are now entered as a JSON array of
{value,label}pairs in a textarea.
[1.3.2] - 2026-06-05
Fix
- DI compile passes on PHP 8.4. The Grid Collection's
setSearchCriteria()override used the wrong sub-namespaced interface and tripped the LSP check.
[1.3.1] - 2026-06-05
Deps
- Widen
magento/module-salesto^102.0 || ^103.0so the module installs on both Magento 2.4.7 and 2.4.8+ without manual constraint edits.
[1.3.0] - 2026-06-05
Admin
- Full admin section under Wimakeit > Order Attributes: grid with filters, mass-actions and inline edit / delete, plus a form with collapsible fieldsets for general settings, scoping, display flags, hints, validation, options and file config. Attributes are created and edited from the back-office, no more code-only patches.
- New
numberinput type alongside text, textarea, select, multiselect, date, file, checkbox and radio.
Feature
- Per-store-view and per-customer-group scoping for every attribute, via multiselects backed by junction tables. Empty selection (or the "All …" sentinel) means the attribute applies everywhere.
Perf
- Existing customer-group CSV scope is migrated automatically to the new junction at
setup:upgradetime (idempotent, transactional, "all groups" sentinel preserved).
[1.2.0] - 2026-06-05
Feature
- Attribute values are now stored on a dedicated quote-side junction (
wimakeit_quote_attribute_value) instead of one flat column per code on thequotetable. Adding a new text- or file-typed attribute no longer requires a database column change.
Perf
- Plugin path on the payment-info save dropped a redundant
cartRepository->save()round-trip thanks to the new repository writing directly to the junction.
[1.1.1] - 2026-06-05
Perf
- Active attribute configuration is now cached under the
wmi_order_attributecache tag (24 h TTL). Checkout, REST, PDF generation and admin order views no longer hit the DB on every request.
Fix
- Default attributes seeded at install correctly mirror into the flat
sales_order_gridtable (was silently ignored by plainEavSetup).
[1.1.0] - 2026-06-05
Security
- Uploaded files are now stored under
var/wimakeit/order_attributes/(outside the web root). They are streamed by a dedicated download controller — frontend requires a customer↔order ownership match, admin requires the standard sales-order ACL. The direct media URL is no longer exposed. - A deny-PHP
.htaccessis dropped into the upload tree on first write (Apache mitigation belt-and-braces).
Admin
- One-shot CLI command
bin/magento wimakeit:order-attributes:migrate-uploadsmoves the bytes from the legacypub/media/location intovar/and rewrites the order column. Idempotent, supports--dry-runand--limit.
Feature
- Migration is intentionally breaking: existing deployments must run the CLI command. The download controller also serves files in the admin order view, so admins reach uploaded documents through the same path as customers.
[1.0.1] - 2026-06-05
Security
- Upload endpoint now requires an active cart session (rejects anonymous open-bucket uploads), runs a
finfomagic-number check after save (rejects renamedshell.phpand friends), and validates the form key on every request. - Path-traversal hardening in the promote-to-order observer: strips
../,..\\and NUL characters before the prefix check. - REST attribute values are length-limited per attribute type (file path 255, text 1000) before they land on the quote.
Fix
- Luma storefront uploads no longer fail silently with HTTP 400 — the JS now falls back to
window.FORM_KEYand the form_key hidden input when Hyvä isn't present. - Dropped the deprecated
$order->save(),Magento\Framework\RegistryandAbstractModel::load()calls flagged by Magento 2.4.
Deps
- All
magento/constraints pinned to versioned ranges (was). PHP range widened to certify 8.4 support.
[1.0.0] - 2026-06-03
Feature
- Initial public release. Two seeded order attributes (
wmi_ref_bon_commandetext,wmi_file_bon_commandefile) configured for the order-summary step. Values flow into the admin sales order grid, the order view, the PDF invoice and the confirmation email — each controlled per attribute. Per-store-view label / placeholder / help overrides viawimakeit_order_attribute_store. File-typed attributes upload through a dedicated storefront route with CSRF, extension allow-list and per-attribute size cap. Theme-agnostic core; Hyvä storefront via the companionwimakeit/module-order-attributes-hyva.
Found a bug? Tell us about it.
A short form opens in a new tab — the module name and your language are already filled in. Share what you tried, what went wrong, and we will get back to you within one business day.
Report a bug for Order AttributesNeed help?
Our team is available to assist with integration.