Magento 2 Cost Center and PO Number Fields at Checkout
SKU: PURCHASEORDERCOSTCENTER1
- capture PO number and cost center directly at checkout
- required field per customer group, validation and dropdown list
- output in email, invoice, packing slip and order grid
- CSV export and REST access for accounting
Einmaliger Kauf · inkl. 12 Monate Updates · zzgl. MwSt.
Magento 2 Cost Center and PO number: details that B2B buyers insist on
With the Magento 2 cost center from Mironsoft you collect two details at checkout without which a company customer cannot book the order internally: their own purchase order number and the cost center. Both fields can be made mandatory for selected customer groups and appear in the confirmation email, on the invoice, in the order grid and in the export. The fields run on Alpine.js in the Hyvä theme and load no extra library.
PO number
A free field for the customer purchase order number, with length limit and allowed characters so that your accounting receives clean references.
Magento 2 cost center
Either free text or a dropdown that you maintain per company or customer group, with number and description.
Required per group
The Magento 2 cost center is mandatory for company customers, hidden for private customers: the rule hangs on the customer group and the store view.
Validation
Checks for length, characters and pattern, immediately at checkout and again on the server.
In email and invoice
Both values appear in the confirmation email and on invoice, packing slip and credit memo.
Grid and export
Own columns in the order grid, filters and CSV export so that accounting reconciles without manual work.
Why company customers expect a cost center in the Magento 2 checkout
In companies every order runs through an internal system. Without a purchase order number and cost center the accounting department rejects the invoice or sends it back. The buyer then writes the details into a comment or calls. Merchants therefore search for a Magento 2 cost center field, a Magento 2 PO number at checkout or a purchase order field. By default there is only the comment field, which nobody evaluates.
With the Magento 2 cost center the details become structured data: mandatory, validated and visible wherever they are needed. That saves queries on both sides and speeds up payment.
Ask for PO number and Magento 2 cost center at checkout
The fields appear in the order step, optionally in the shipping step, the payment step or directly above the summary. You set label, placeholder and help text per store view. The cost center can appear as free text or as a dropdown that is maintained per company or customer group. The last value used by a logged-in customer is prefilled but remains editable. Guests can use the fields too if you allow it.
- Position of the fields at checkout selectable
- Free text or dropdown per customer group
- Prefill from the last order
Make the Magento 2 cost center required per customer group
In the admin you decide per customer group whether PO number and cost center are hidden, optional or mandatory. The validation checks minimum and maximum length, allowed characters and an optional pattern, for example digits only for cost centers. The check runs in the browser with Alpine.js and afterwards on the server, so that even a manipulated request cannot store invalid values. You maintain the error messages per store view.
- Hidden, optional or required per group
- Check length, characters and pattern
- Server-side control on top of the browser
Show the cost center in email, invoice and packing slip
Both values are stored on the order and appear in the confirmation email, in the customer order view and in the admin. On invoice, packing slip and credit memo they appear as an additional line under the address if your PDF template provides for it; the module supplies the variables. You decide whether a detail should appear on the invoice. The shop operator checks mandatory invoice content with their tax adviser.
- Confirmation email and order view
- Line on invoice, packing slip, credit memo
- Variables for custom PDF templates
Order grid, filters and CSV export for accounting
In the order grid, PO number and cost center appear as columns with filter and full-text search. The CSV export contains both fields so that accounting can evaluate orders by cost center. The values are also available in the REST interface as extension attributes of the order so that an ERP or merchandise system can take them over. Changing them later in the admin is possible and logged in the order history.
- Columns, filters and search in the order grid
- CSV export with both fields
- REST access for ERP and accounting
Where the Magento 2 cost center prevents queries in daily shop work
Four typical situations in business with companies and public bodies.
Industry and trades
With the Magento 2 cost center purchasing assigns every order to a project, and the invoice passes approval without questions.
Public bodies and schools
Next to the Magento 2 cost center, the purchase order number from the budget system appears on invoice and packing slip, and dropdown lists prevent typing errors.
Groups with several sites
Every site picks its Magento 2 cost center from its own list while headquarters evaluates through the export.
Service providers and agencies
Orders for client projects carry the project number as the cost center and can be re-invoiced later.
Magento 2 cost center compared: comment field and structured fields
What changes when references no longer get lost in free text.
| Topic | Without module | With Mironsoft PO Number & Cost Center |
|---|---|---|
| Capture | In the comment field, often forgotten | Own fields, switchable as required |
| Quality | Typos and free formats | Check for length, characters and pattern |
| Invoice | Detail missing or added manually | Line from the order |
| Evaluation | Reading comments one by one | Column, filter and CSV export |
| System link | None | Extension attributes via REST |
How we set up the Magento 2 cost center for your shop
The process after you place the order.
Alignment
You tell us the customer groups, the mandatory rules for the cost center, validation patterns and the places where the values should appear.
Installation
We install the module and configure the Magento 2 cost center with fields, texts and prefill.
Lists and patterns
We store cost center lists, validation patterns and error messages per store view.
Email and PDF
We add the lines to confirmation email, invoice, packing slip and credit memo.
Test and handover
We test checkout as a guest and customer, export and REST and train your team on the settings.
Scope of the Magento 2 cost center compared with approvals and sub accounts
The module captures and distributes two details; it decides nothing. Approval rules and spending limits are handled by separate Mironsoft modules, and employee logins with roles are covered by sub accounts. The Magento 2 cost center can be combined with all of them, for example as a mandatory detail before an order goes to approval.
The module does not check whether a cost center exists in the customer system; it only ensures format and completeness.
No download — personal setup instead
PO Number & Cost Center is not listed here as a ready-made download file to install yourself. The purchase is a commission: after the purchase we get in touch, install the module in your shop and agree fields, mandatory rules and output with you.
Frequently asked questions
Everything important about fields, requirements, output and how the purchase works.
How can I ask for a cost center at checkout in Magento 2?
How can I store the PO number and cost center in Magento 2?
Can I make the Magento 2 cost center mandatory for company customers only?
Can the Magento 2 cost center be chosen from a list?
Do the values appear on the invoice?
How is the input validated?
Can the admin change the values later?
Does the Magento 2 cost center work with Hyvä?
Can an ERP retrieve the values?
Can I download and install the module myself?
Magento 2 Cost Center – Mironsoft PO Number & Cost Center