Order Attributes

v1.8.2 Mis à jour le 28 août 2026

Order Attributes

Des champs de checkout personnalisés, repris jusque dans la commande, l'admin, l'email de confirmation et la facture PDF, uploads de fichiers compris.
Magento 2.4.4 Magento 2.4.5 Magento 2.4.6 Magento 2.4.7 Mage-OS 2.0 Mage-OS 2.1
129,00 €
Essayer la démo en ligne
  • Mises à jour et support inclus pendant 12 mois
  • Clé de licence livrée immédiatement par email
  • Garantie satisfait ou remboursé 30 jours
  • Documentation complète incluse
  • Installation prête pour Composer

Order Attributes

Capturez les informations supplémentaires dont vos clients ont besoin de vous donner au checkout — une référence de bon de commande, un code projet, un PO téléversé, une date de livraison — et faites-les remonter jusqu'à la commande, l'admin, l'email de confirmation et la facture PDF. Wimakeit Order Attributes injecte des champs personnalisés configurables au checkout, stocke leurs valeurs sur la commande, et les expose partout où vos équipes regardent.

Conçu comme un cœur propre et theme-agnostic pour Magento 2.4 / Mage-OS, le module embarque toute la data layer (EAV + colonnes plates quote + junction tables pour les scopes), un endpoint d'upload sécurisé qui sert les fichiers hors du web root, et une section admin complète pour gérer les attributs sans toucher au code.

À qui ça s'adresse

  • Marchands B2B qui doivent collecter une référence de bon de commande, un code acheteur ou un numéro de projet sur chaque commande avant facturation
  • Sites qui doivent récupérer un document (PDF, image) auprès du client au moment de l'achat
  • Marchands qui veulent des champs checkout configurables depuis l'admin — sans abonnement Amasty / Mageworx / Aheadworks
  • Équipes qui migrent depuis l'intégration legacy Amasty Order Attribute du stack Luma

Bénéfices clés

  • Section admin CRUD complète — gérez les attributs depuis Wimakeit > Order Attributes : créer, éditer, activer / désactiver, trier, mass-delete. Plus besoin d'éditer des patches en code ni de toucher MySQL.
  • 9 input types de base — text, textarea, number, select, multiselect, date, file upload, checkbox, radio. Les options pour select / multiselect / radio / checkbox se saisissent en JSON (array de {value,label}) sur le formulaire d'attribut.
  • Scope par store + par customer group — multiselects sur le formulaire admin, adossés à des junction tables (wimakeit_order_attribute_store_view, wimakeit_order_attribute_customer_group). Laisser vide = applique partout.
  • Uploads sécurisés — stockés sous var/ (hors web root), gardés par validation du form_key (CSRF), checks MIME / magic-number via finfo, .htaccess deny-PHP sur l'arbre d'upload, extension allow-list et size cap par attribut. Les fichiers sont streamés par un download controller dédié avec vérif d'appartenance client ↔ commande (frontend) ou ACL sales_order (admin).
  • Visible partout où ça compte — les valeurs remontent dans le sales order grid (filtrables / cherchables si flag activé), la vue commande, la facture PDF, l'email de confirmation — pilotable par attribut via les flags Show in ….
  • Defaults sensés livrés en standard — un data patch crée deux attributs prêts à l'emploi (wmi_ref_bon_commande, wmi_file_bon_commande) au setup:upgrade, donc le module est utile dès l'install.
  • Cœur propre, theme-agnostic — pour une storefront Hyvä, accompagnez-le de wimakeit/module-order-attributes-hyva pour la section checkout Alpine.

Compatibilité

  • Magento 2.4.x / Mage-OS équivalent
  • PHP 8.1, 8.2, 8.3, 8.4
  • Dépend de Magento sales, checkout, quote, customer et eav
  • Cœur theme-agnostic ; rendu checkout Hyvä via le companion Hyvä

Installez ce module via Composer. Assurez-vous que votre auth.json est configuré avec vos identifiants Wimakeit.

Terminal
$ 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-sales
  • magento/module-checkout
  • magento/module-quote
  • magento/module-customer
  • magento/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

ResourceDefault scopePurpose
Wimakeit_OrderAttributes::orderattributesParent — admin role treeWraps the Order Attributes menu group
Wimakeit_OrderAttributes::attributeChildRequired 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 codeTypeRequiredStepShow in gridShow in PDFShow in email
wmi_ref_bon_commandetextNoOrder SummaryYesYesYes
wmi_file_bon_commandefileNoOrder SummaryNoNoNo

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

TablePurpose
wimakeit_order_attributeAttribute configuration rows (label, type, flags, validation)
wimakeit_order_attribute_storePer-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_key is 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 finfo after 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 .htaccess dropped into the upload tree on first write (Apache mitigation belt-and-braces for the var/ 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 mois
Dernière mise à jour
28 août 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ä
Non compatible
Package
wimakeit/module-order-attributes

Vérifier la compatibilité

Indiquez votre stack pour vérifier la compatibilité du module.

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_source after setup:di:compile. The order-attributes grid's CollectionFactory collections binding moved from etc/adminhtml/di.xml to global etc/di.xml so 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. The PaymentInformationManagementPlugin was split into two classes pointing at the right interfaces (logged-in vs guest), so Magento dispatches before<Method> to the correct subject signature.

[1.3.4] - 2026-06-05

Fix

  • setup:upgrade no 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 on sales_order_grid can 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-sales to ^102.0 || ^103.0 so 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 number input 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:upgrade time (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 the quote table. 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_attribute cache 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_grid table (was silently ignored by plain EavSetup).

[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 .htaccess is dropped into the upload tree on first write (Apache mitigation belt-and-braces).

Admin

  • One-shot CLI command bin/magento wimakeit:order-attributes:migrate-uploads moves the bytes from the legacy pub/media/ location into var/ and rewrites the order column. Idempotent, supports --dry-run and --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 finfo magic-number check after save (rejects renamed shell.php and 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_KEY and the form_key hidden input when Hyvä isn't present.
  • Dropped the deprecated $order->save(), Magento\Framework\Registry and AbstractModel::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_commande text, wmi_file_bon_commande file) 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 via wimakeit_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 companion wimakeit/module-order-attributes-hyva.

Vous avez trouvé un bug ? Faites-nous-en part.

Un court formulaire s'ouvre dans un nouvel onglet — le nom du module et votre langue sont déjà pré-remplis. Décrivez ce que vous avez tenté, ce qui n'a pas fonctionné, et nous vous répondrons sous un jour ouvré.

Signaler un bug pour Order Attributes
SKU module : wimakeit-module-order-attributes · Langue : fr_FR

Besoin d'aide ?

Notre équipe est disponible pour vous accompagner dans l'intégration.

Contactez-nous
Planifier un appel