Cost-Center Extension
Introduction
The "Costcenter"-Extension implements two offline-payment methods (costcenter & costcenter2) for Magento2.
Features
Frontend
Adds two new payment methods to the storefront. The two payment methods are highly customizable and can be used for different purposes.
Available, customizable input fields in storefront:
- Costcenter (available as textinput or dropdown select)
- Project
- Debtor
Each of these additional inputs, could be
- enabled/ disabled
- required/ optional
- with/ without validation
Each of these input options can have
- a label
- a placeholder
- a comment
Backend
Dropdown select of predefined costcenters
The dropdown selectbox lists existing, preconfigured costcenters. Costcenters can be managed from the Magento Backend. The selectbox lists either systemwide or userspecific costcenters.
Cost Centers can be managed from the backend of Magento2.x. Please go to "Customers->Manage Cost Centers" to manage your available list of cost centers.
A cost center is defined by
- Name
- code
- Relation to Website
Please note: The cost center list must be activated in the payment configuration!
In order to show only selected (with the customer related) cost centers, they must be configured at the customer.
Restricted Payment Access
The access to the costcenter payment method can be restricted by either
- a matching cutomer attribute value
- a matching customer role (Important: Only available to users of the "Customer_Role"-Extension)
Validation rules
There are predefined validation rules available for the inputfields.
- No validation
- letters-with-basic-punc
- letters-only
- no-whitespace
- integer
- validate-no-utf8mb4-characters
- email2
- url2
- validate-alphanum-with-spaces
- validate-email
- validate-url
- validate-not-negative-number
- validate-zero-or-greater
- validate-greater-than-zero
- validate-number
- validate-alpha
- validate-code
- validate-alphanum
- max-words (Value)
- min-words (Value)
- stripped-min-length (Value)
- pattern (Value) (RegExp)
Configuration
(Stores->Configuration->Sales->Payment Methods->Costcenter & Costcenter2)
| Option | Type | Description | Scope |
|---|---|---|---|
| Enabled | Yes, No(Default) | Enables Payment Method | System->Website |
| Title | String | Title of Payment Method in Checkout | System->Storeview |
| New Order Status | Dropdown | Avaiable Orderstatus | System->Website |
| Payment from Applicable Countries | Dropdown | All allowed countriesSpecific countries | System->Website |
| Payment from Specific Countries | MultipleSelect | Available Countries | System->Website |
| Restrict payment method | Dropdown | NoYes on customer attributeYes on customer role | System->Website |
| Allowed Attribute | Dropdown | Avaiable Customer Attributes of System | System->Website |
| Allowed Attribute Values | MultipleSelect | Avaiable AttributeValues (Important: Available values available after saving the store configuration | System->Website |
| Display Costcenter | Yes, No(Default) | Shows costcenter input field in checkout | System->Website |
| Cost Center Required | Yes, No(Default) | required or optional input | System->Website |
| Cost Center Validation | Yes, No(Default) Validates input | System->Website | |
| Use Dropdown for Cost Center | Yes, No(Default) | Shows dropdown select instead of input field in checkout | System->Website |
| Costcenter show Label | Yes, No(Default) | Shows label in checkout | System->Website |
| Costcenter Label | String | Label for Costcenter | System->Website |
| Cost Center Placeholder | String | Placeholder for input field | System->Website |
| Cost Center Comment | String | Comment for input field | System->Website |
| Display Project | Yes, No(Default) | Show project input field in checkout | System->Website |
| Project Required | Yes, No(Default) | required or optional input | System->Website |
| Project Validation | Yes, No(Default) Validates input | System->Website | |
| Project show Label | Yes, No(Default) | Shows label in checkout | System->Website |
| Project Label | String | Label for Costcenter | System->Website |
| Project Placeholder | String | Placeholder for input field | System->Website |
| Project Comment | String | Comment for input field | System->Website |
| Display Debtor number | Yes, No(Default) | Show project input field in checkout | System->Website |
| Debtor number Required | Yes, No(Default) | required or optional input | System->Website |
| Debtor number Validation | Yes, No(Default) Validates input | System->Website | |
| Debtor number show Label | Yes, No(Default) | Shows label in checkout | System->Website |
| Debtor number Label | String | Label for Costcenter | System->Website |
| Debtor number Placeholder | String | Placeholder for input field | System->Website |
| Debtor number Comment | String | Comment for input field | System->Website |
| Minimum Order Total | Int | Minimum total of cart | System->Website |
| Maximum Order Total | Inr | Maximum total of cart | System->Website |
| Sortorder | Int | Sortorder for Payment | System->Website |
| Enabled Zero Subtotal Checkout | Yes(Default), No | If disabled, Costcenter-Payment is forced even Subzero-Total-Payment is active | System->Website |
Addons
There are no addons available!
Support
If you need help using the extension, please get in touch with us by sending an email to support@enobis.de.
Changelog
1.9.1 (2026-04-09)
-
2026-04-09Logging removed from the module (3a2c6ed) -
2026-04-09Version: 1.9.1 (3d81385)- Logging removed from the module
1.9.0 (2026-03-19)
-
2026-03-19Tweak code (5f6bbd0)Allow PHP
8.3Drop PHP7.4support -
2026-03-19Version 1.9.0 (2db3ea8)Allow PHP
8.3#14375
1.8.3 (2025-07-09)
-
2025-07-09Fix backend order edit problems (b4be979) -
2025-07-09Version 1.8.3 (36a1993)Add functions for backend order editing
1.8.2 (2025-05-20)
-
2025-05-20- Cost center 2 can run independently of cost center 1 (c6e4e3a) -
2025-05-20Version: 1.8.2 (34fef82)Bugfix:
- Cost center 2 can run independently of cost center 1
1.8.1 (2025-05-12)
-
2025-05-12- Error fixed if attributes are not yet set (c7da157) -
2025-05-12Version: 1.8.1 (fd76f58)Bugfix:
- Error fixed if attributes are not yet set
1.8.0 (2025-05-09)
-
2025-05-07- Authorisations integrated on the basis of roles (06f32e0) -
2025-05-09- Paymantmethod can now be restricted to mapping a customer attribute (fd5a911) -
2025-05-09Tweak code (b86b9bf) -
2025-05-09Version: 1.8.0 (53e3420)Feature:
- Paymant method can now be restricted to mapping a customer attribute
- Authorisations integrated on the basis of roles
1.7.8 (2025-01-29)
-
2025-01-29PHP 8.2 support added (596e364) -
2025-01-29Introduce .gitattributes to exclude development files (7212049) -
2025-01-29Update README.md (db83c76) -
2025-01-29Merge branch 'fixes' into dev (6724cbe) -
2025-01-29Version 1.7.8 (cf9cd72)PHP 8.2 support added
1.7.7 (2024-06-13)
-
2024-06-13- Cost Center variables added to the sales mails (fc8698a)- Cost Center variables added to the vendor mails of our Enobis_Vendor module
-
2024-06-13Tweak code (7b5dad3) -
2024-06-13Version: 1.7.7 (dff594e)Optimization:
- Cost Center variables added to the sales mails
- Cost Center variables added to the vendor mails of our Enobis_Vendor module
1.7.6 (2024-06-05)
-
2024-06-05- Configuration of the field label names (bc91c54)- Configuration of the display of field label names
-
2024-06-05Tweak code (5f1dbfd) -
2024-06-05Version: 1.7.6 (05c6cbb)Optimization:
- Configuration of the field label names
- Configuration of the display of field label names
1.7.5 (2024-01-16)
-
2024-01-16magento2 2.4.6 compatibility (c6af041) -
2024-01-16version 1.7.5 (e4a0bdc)magento2 2.4.6 compatibility
1.7.4 (2024-01-16)
-
2024-01-16fix magento2 2.4.x bug "Invalid parameter number: number of bound variables occured" when saving costcenter via backend (55a956e) -
2024-01-16version 1.7.4 (055d290)fix magento2 2.4.x bug "Invalid parameter number: number of bound variables occured" when saving costcenter via backend
1.7.3 (2023-10-23)
-
2023-10-23add en_IE translation (based on en_US) (8a4521e) -
2023-10-23version 1.7.3 (90626c2)add en_IE translation (based on en_US)
1.7.2 (2023-05-10)
-
2023-05-10small fix for case sensitive import form block class generatition (2a1bed5) -
2023-05-10version 1.7.2 (e440198)small fix for case sensitive import form block class generatition
1.7.1 (2023-05-09)
-
2023-05-09add import to backend cost center grid (c7d885b)import sample file added (etc/import-examples/costcenter.csv)
-
2023-05-09version 1.7.1 (30ca90e)add import to backend cost center grid import sample file added (etc/import-examples/costcenter.csv)
1.7.0 (2023-02-15)
-
2023-02-15- PHP 8.x compatibility, avoid passing null values to string functions, (checked with rector) (9447ab9) -
2023-02-15Ticket #13245 - Eventshop (zone2) Checkout anpassen (8a0b6bd) -
2023-02-15- PHPStan (104843d) -
2023-02-15PHP-CS-Fixer (15b52a1) -
2023-02-15Version: 1.7.0 (3a335ca)Feature:
- Add Debtor number
1.6.1 (2022-12-16)
-
2022-12-16PHP 8.x compatibility (di compile error) (096f4cc)should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used
-
2022-12-16version 1.6.1 (1228523)PHP 8.x compatibility (di compile error) should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used
1.6.0 (2022-09-07)
-
2022-09-07Version 1.6.0 (151deee)Cost centers can be limited to customer groups if no explicit customer assignments are made.
1.5.1 (2022-04-06)
2022-04-061.5.1 Possibility to define the Costcenter matching attribute for the customer import. (e.g. code, name) (3045029)
1.5.0 (2022-03-07)
-
2022-03-04add costcenter2 payment method (5d7d75a) -
2022-03-07fix: requests for /rest/default/V1/carts/mine/set-payment-information while selecting cost center payments in checkout return 400 Bad Request response (23af02f) -
2022-03-07php cs fixer (50709cd) -
2022-03-07Merge branch 'feature/payment-method-cost-center2' into dev (661b570) -
2022-03-07Version 1.5.0 (45f55e6)add costcenter2 payment method
1.4.1 (2022-02-25)
-
2022-02-25Version 1.4.1 (2f2a4ff)fix: default magento import customer with specified cost center fields (cost_center or cost_center_default) does not work
1.4.0 (2021-10-28)
-
2021-10-27add "assign cost center" and "assign default cost center" mass action to customer grid (9115e0a)introduce delete mass action for cost center grid
-
2021-10-28phpcs fixes (1491fbd) -
2021-10-28Merge branch 'feature/assign-cost-center-massaction' (e95825f) -
2021-10-28Version 1.4.0 (c400163)improve mass actions add "assign cost center" and "assign default cost center" mass action to customer grid introduce delete mass action for cost center grid
1.3.5 (2021-04-18)
2021-04-181.3.5 sortierung website erzeugt fehler da nachgeladen -> sortable false (7b47e7f)
1.3.4 (2021-04-15)
2021-04-151.3.4 validierung cost center website (d7ef78f)
1.3.3 (2020-11-17)
-
2020-11-17Version: 1.3.3 (f067448)Bugfix:
- Internet Explorer 11 kompatible
1.3.2 (2020-11-10)
-
2020-11-10Version: 1.3.2 (3ce0212)Optimization:
- Erlaubt bei einem Warenkorbwert von 0 diese Zahlart
1.3.1 (2020-10-29)
-
2020-10-29Version: 1.3.1 (b836dec)Optimization:
- RegEx Validation hinzugefügt
- Validationn mit optionalen Wert Bugfix:
- Ausblenden der Felder in der Bestellhistorie wenn diese nicht angezeigt werden sollen
- Richtigen Kommentar anzeigen
1.3.0 (2020-10-27)
-
2020-10-27Version: 1.3.0 (f5ebd38)Feature:
- Deaktivierung von Cost Center
- Validierungsklassenauswahl an Cost Center
- Pflichtfeld Definition von Cost Center
- Placeholder für Cost Center
- Comment für Cost Center
- Deaktivierung von Project
- Validierungsklassenauswahl an Project
- Pflichtfeld Definition von Project
- Placeholder für Project
- Comment für Project
1.2.10 (2020-10-13)
2020-10-13Version 1.2.10 - bugfix in costcenter.phtml (12371cd)
1.2.9 (2020-10-13)
-
2020-10-13Project-Feld ins Backend(Edit Order) aufgenommen (4f74c5b)Signed-off-by: Karl Büdding karl.buedding@enobis.de
1.2.8 (2020-09-01)
2020-09-011.2.8 Add cost_center and project to rest api (23df26e)
1.2.7.2 (2020-03-11)
-
2020-03-11Version 1.2.7.2 - Translations (4572dd0)Signed-off-by: Karl Büdding karl.buedding@enobis.de
1.2.7.1 (2020-02-20)
-
2020-02-20fix: fatal error when saving customers in backend (217e72c) -
2020-02-20Version 1.2.7.1 (4448082)fix: fatal error when saving customers in backend
1.2.7 (2020-02-19)
-
2020-02-19fix: selected customer cost centers cannot be removed (ed3e793) -
2020-02-19remove php requirements (7bbed25) -
2020-02-19simplify magento-module dependencies (24f5561) -
2020-02-19Version 1.2.7 (b9c6e29)simplify magento-module dependencies remove php requirements fix: selected customer cost centers cannot be removed
1.2.6 (2019-10-23)
-
2019-10-23Version 1.2.6 PHP 7.2 Kompatibilität (9fd11fd)Signed-off-by: Karl Büdding karl.buedding@enobis.de
1.2.5 (2019-02-25)
2019-02-25Konfiguration ob alle Kostenstellen angezeigt werden, wenn dem Benutzer keine zugewiesen ist. (a0dbfd8)
1.2.4 (2019-02-22)
2019-02-22Erweiterung für „Checkout mit mehreren Adressen“ (704c739)
1.2.3 (2019-02-20)
2019-02-20Groß- und Kleinschreibung (d358712)
1.2.2 (2019-02-18)
2019-02-18Beim Anlegen eines Benutzers übers Backend wird kein Array übergeben (1aeb5dc)
1.2.1 (2019-02-14)
-
2019-02-14add methods required by interface (a3ece96) -
2019-02-14Fatal Error bei DI-Kompilierung #10592 (bbf076e) -
2019-02-14Version bump (fa11ea2) -
2019-02-14Version 1.2.1 (9dba04a)Fatal Error bei DI-Kompilierung #10592
1.2.0 (2019-02-13)
-
2019-01-31install "cost_center"-table + payment columns (d18785d) -
2019-01-31di.xml changes for backend (9228a31) -
2019-01-31add "Manage Cost Centers" to backend menu (647ee2e) -
2019-01-31backend index listing + cost_center form (96e84ae) -
2019-02-05change namespace enobis_cost_center to cost_center (e8525cd) -
2019-02-05fix label and html title according navigation (660f858) -
2019-02-05fix labels (f5d055c) -
2019-02-05fix actions as last column (a05a878) -
2019-02-05fix backend acl (6d2fd9f) -
2019-02-05fix labels in form (64cbcb1) -
2019-02-05add var comment (9884703) -
2019-02-05show full cost center name when editing in backend (b90f730) -
2019-02-05change text messages (d12dbac) -
2019-02-05fix name (2db5302) -
2019-02-05Add created_at and updated_at column (a54b4ad) -
2019-02-05add validation before save (7b3e612) -
2019-02-05add reset button (379c1d3) -
2019-02-05add todos (e9cd37a) -
2019-02-05change table to cost_center_entity and primary column to entity_id (6f76b28) -
2019-02-05add cost_center attribute to customer (27bed6d) -
2019-02-05add ui-select to customer cost_center-attribute (50e732f) -
2019-02-06add todo (f105588) -
2019-02-06Configuration to select cost center from dropdown (2dd6773) -
2019-02-06provide payment method config in checkout (6a6037d) -
2019-02-11Merge branch 'dev' into add-adminhtml-area-and-customer-attributes-#10549 (3241f48) -
2019-02-11set grid-flags for customer attribute to false to prevent customer grid indexer to fail (1cd13ec) -
2019-02-11provide customer cost centers to checkout (0c5d497) -
2019-02-11cache tag (bac0409) -
2019-02-11fix sort order (1bc4783) -
2019-02-11provide cost center dropdown info to checkout (8663012) -
2019-02-11add cost center dropdown logic to method form (ebd97fd) -
2019-02-11add some space between form and button (e84f4d6) -
2019-02-11process cost_center_id + cost_center_name + cost_center_code (35d3499) -
2019-02-11add customer "cost_center_default"-attribute (6dec392) -
2019-02-11add api data classes (3b6c28d) -
2019-02-11remove todo (d6d164d) -
2019-02-11add cost_center_website-table (0304aaf) -
2019-02-11add websites field to cost_center_form (5f52039) -
2019-02-11add website_ids logic (855075b) -
2019-02-11add sort order to columns (d85e213) -
2019-02-11use interface (aec201c) -
2019-02-12add website column to cost_center_listing (afb5767) -
2019-02-12add customer website filter to source-models (dfd18ee) -
2019-02-12use more specific config path (94f7966) -
2019-02-12make cost_center_default select non multiple (597a529) -
2019-02-12allow reset cost_center_default value (087e8ba) -
2019-02-12allow filterOptions for cost_center_default (47e657e) -
2019-02-12Translations (1c510ef) -
2019-02-13change messages (0d71428) -
2019-02-13change routes (7e636e4) -
2019-02-13revert seperation of model and api-data (1b35480) -
2019-02-13change message (155e20d) -
2019-02-13Translations (8914b73) -
2019-02-13use NONE rather then "Please select" (d23b979) -
2019-02-13Backend-Verwaltung + Kostenstellen-Auswahl am Kunden #10549 (8da93f4) -
2019-02-13Version bump (b726c72) -
2019-02-13Version 1.2.0 (42ae631)Backend-Verwaltung + Kostenstellen-Auswahl am Kunden #10549
1.1.0 (2019-02-07)
-
2019-02-07add required config for fields (4225bf9) -
2019-02-07add project field to cost center form + required logic (c37985d) -
2019-02-07provide payment method config to checkout (15319d7) -
2019-02-07add project column to tables (d78a7d8) -
2019-02-07convert new payment field to order payment (5380da7) -
2019-02-07show project within payment section of order views (8f903d3) -
2019-02-07Weiteres Feld "project" in Bezahlart und Pflichtfeld-Prüfung einstellbar #10569 (012d5dd) -
2019-02-07Version 1.1.0 (fc22f65) -
2019-02-07Version 1.1.0 (0a3900c)Weiteres Feld "project" in Bezahlart und Pflichtfeld-Prüfung einstellbar #10569
-
2019-02-07Version 1.1.0 (adf0ae6)Translations
1.0.0 (2019-01-30)
-
2019-01-29add payment method in configuration (70d77c9) -
2019-01-29setup install schema - add cost_center-column to quote/order payment tables (b7174e3) -
2019-01-29implement payment method in checkout (1c89219) -
2019-01-29handle "cost_center"-field within extension attributes in checkout (1488a1d) -
2019-01-29plugin to add "cost_center" value to "quote_payment"-table (950ff80) -
2019-01-29process/add "cost_center"-value by payment method instance (f34ee86) -
2019-01-29disable "add value"-plugin in favor of handling by payment method instance (a337874) -
2019-01-29convert cost_center data from quote to order (c696d7c) -
2019-01-30add payment info/form blocks for frontend/adminhtml (15e9b64) -
2019-01-30add cost center dummy validation (28d61cc) -
2019-01-30remove comment (733dc7a) -
2019-01-30fix payment method label in configuration (2f07786) -
2019-01-30Translations (f138aa5) -
2019-01-30add description to composer.json (303ee3d) -
2019-01-30Version 1.0.0 (4d1f8af) -
2019-01-30Version 1.0.0 (ef1650f)Kostenstellen-Zahlart mit einfacher Eingabebox (regex) #10537
0.0.1 (2019-01-28)
2019-01-28base files (b45940a)