LokiCheckout_AccountType
This Magento 2 module is an add-on package for adding a new field Account Type to the Loki Checkout, allowing a customer to register as either on Individual account or a Company account. When the account type is set to Individual, the company field and the VAT ID field are not rendered.
Installation
Install this package via composer:
composer require loki-checkout/magento2-account-type
Next, enable this module:
bin/magento module:enable LokiCheckout_AccountType
Architecture
This module adds a new Loki Component account_type to both the billing and the shipping address. This includes both a ComponentViewModel and a ComponentRepository. To allow for the company field and the VAT ID field not to be rendered, DI plugins are made for the corresponding ComponentViewModels.
Support
For getting support, create an Issue under the following project URL:
https://gitlab.yireo.com/loki-checkout/LokiCheckout_AccountType.git
Configuration Options
The following options of this module can be configured via the Store Configuration:
loki_checkout/account_type/hide_company
loki_checkout/account_type/hide_vat_id
loki_checkout/account_type/default
Loki Components
The following LokiComponents are created or references in this module:
loki-checkout.billing.address.account_type
loki-checkout.shipping.address.account_type
Module Dependencies
The following dependencies are declared in the module its `etc/module.xml` file:
LokiCheckout_Core
Loki_Base
Loki_Components
Loki_CssUtils
Loki_FieldComponents
Loki_MapComponents
Magento_Backend
Magento_Catalog
Magento_Checkout
Magento_CheckoutAgreements
Magento_Config
Magento_Customer
Magento_Directory
Magento_Eav
Magento_MediaStorage
Magento_Newsletter
Magento_Payment
Magento_Quote
Magento_Sales
Magento_Shipping
Magento_Store
Magento_Tax
Magento_Theme
Magento_Vault
Yireo_CspUtilities
Composer details
LokiCheckout_AccountTypeloki-checkout/magento2-account-type
loki-checkout/magento2-core: ^2.0
loki/magento2-components: ^2.0
loki/magento2-field-components: ^2.0
magento/framework: ^103.0
magento/module-config: ^101.0
magento/module-customer: ^103.0
magento/module-eav: ^102.0
magento/module-quote: ^101.0
magento/module-store: ^101.0
Releases
| 2.0.16 | 12 June 2026 |
| 2.0.15 | 12 June 2026 |
| 2.0.14 | 12 June 2026 |
| 2.0.13 | 12 June 2026 |
| 2.0.12 | 12 June 2026 |
| 2.0.11 | 12 June 2026 |
| 2.0.10 | 12 June 2026 |
| 2.0.9 | 12 June 2026 |
| 2.0.8 | 12 June 2026 |
| 2.0.7 | 12 June 2026 |
| 2.0.6 | 12 June 2026 |
| 2.0.5 | 12 June 2026 |
| 2.0.4 | 12 June 2026 |
| 2.0.3 | 12 June 2026 |
| 2.0.2 | 12 June 2026 |
| 2.0.1 | 12 June 2026 |
| 2.0.0 | 12 June 2026 |
| 1.0.1 | 12 June 2026 |
| 1.0.0 | 12 June 2026 |
| 0.0.8 | 12 June 2026 |
Changelog
[2.0.16] - 28 January 2026
Fixed
- Fix unit test with AccountTypeRepository
- Account type was never saved to billing address
[2.0.15] - 17 December 2025
Fixed
- Remove final-keyword from test-methods
- Add tsconfig.json that extends
LokiCheckout_FunctionalTests
[2.0.14] - 15 December 2025
Fixed
- Fix unit tests
[2.0.13] - 11 December 2025
Fixed
- Anticipate newer account types
- Rename deprecated AddressState::save/load to set/get
- Remove redundant quote save
[2.0.12] - 21 November 2025
Fixed
- Remove deprecated LokiCheckoutPageTestCase in integration tests
- Update composer keywords
[2.0.11] - 10 October 2025
Fixed
- Add Dutch translations
- Update README
[2.0.10] - 04 September 2025
Fixed
- Rename FieldTemplateLocator to FieldTypeManager
- Fix integration tests and unit test
- Make sure address lookups and changes are made on correct address
- Copy generic CI/CD files
[2.0.9] - 02 September 2025
Fixed
- Add StoreView scope to config values
[2.0.8] - 02 September 2025
Fixed
- Refactor Loki-library location in Playwright tests
[2.0.7] - 29 August 2025
Fixed
- Set default account type to "company" if address contains a company value
- Reset values of VAT ID and company when switching to individual
[2.0.6] - 28 August 2025
Fixed
- Add CI files
- Fix PHP check in Gitlab CI/CD
[2.0.5] - 21 August 2025
Fixed
- Add dependency with loki/magento2-css-utils
[2.0.4] - 18 August 2025
Fixed
- Lower requirements to PHP 8.1
- Fix integration tests with ConfigFixture scope
[2.0.3] - 07 August 2025
Fixed
- Lower PHP requirement to PHP 8.2+
[2.0.2] - 30 July 2025
Fixed
- Add language pack
[2.0.1] - 24 July 2025
Fixed
- Bump version of Yireo Integration Testing Helper
[2.0.0] - 22 July 2025
Fixed
- Bump
LokiCheckout_Coreto 2.0 - Rename PHP namespace from
Yireo_Loki*toLoki* - Rename composer package from
yireo/magento2-loki*toloki/magento2*
[1.0.1] - 20 June 2025
Fixed
- Finalize new grid settings
- Automatically position new fields
- Use Loki test-case in Playwright to detect JS errors automatically
- Rewrite @helpers to @loki in Playwright tests
[1.0.0] - 24 May 2025
Fixed
- Fix failing tests
- Generate new MODULE.json with simple test count
- Allow PHP 8.4 in CI
- Update composer and module deps
[0.0.8] - 25 April 2025
Fixed
- Allow upgrading to LokiFieldComponents and LokiCheckout 1.0
- Change composer keyword loki-misc to loki-other
- Allow upgrade to LokiComponents 1.0
- Remove default params
- Remove gridClass, add colSpan and mdColSpan in grid layouts
- Remove CheckoutSession from context
- Remove FieldTemplateLocator from context
- Remove CartRepository from all contexts
- Rewrite
getCartRepository()->save()togetCheckoutState()->saveQuote()
[0.0.7] - 16 April 2025
Fixed
- Remove obsolete file
[0.0.6] - 08 April 2025
Fixed
- Enhance tests
- Implement LokiCheckoutRepositoryTestCase
[0.0.5] - 25 March 2025
Added
- Major additions of unit tests and integration tests
- Add EAV attribute
account_typeincustomer_addressto save value into
[0.0.4] - 11 March 2025
Fixed
- Add module dependencies
- Huge refactoring to move logic into new LokiFieldComponents
[0.0.3] - 22 February 2025
Fixed
- Update
loki_checkout.xmlgrid CSS for mobile
[0.0.2] - 21 February 2025
- Version bump
[0.0.1] - 21 January 2025
- Add proper deps
- Initial release