This 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.
Install this package via composer (assuming you have setup the composer.yireo.com
repository correctly already):
composer require loki-checkout/magento2-account-type
Next, enable this module:
bin/magento module:enable LokiCheckout_AccountType
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.
For getting support, create an Issue under the following project URL:
https://gitlab.yireo.com/loki-checkout/LokiCheckout_AccountType
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
The following LokiComponents are created or references in this module:
loki-checkout.shipping.address.account_type
loki-checkout.billing.address.account_type
The following dependencies are declared in the module its `etc/module.xml` file:
Magento_Backend
Magento_Config
Magento_Customer
Magento_Eav
Magento_Store
LokiCheckout_Core
Loki_Components
Loki_FieldComponents
Yireo_IntegrationTestHelper
LokiCheckout_AccountType
loki-checkout/magento2-account-type
magento/framework: ^103.0
magento/module-config: ^101.0
magento/module-customer: ^103.0
magento/module-eav: ^102.0
magento/module-store: ^101.0
loki/magento2-field-components: ^2.0
loki/magento2-components: ^2.0
loki/magento2-css-utils: ^1.0
loki-checkout/magento2-core: ^2.0
dev-main | 29 August 2025 |
2.0.7 | 29 August 2025 |
2.0.6 | 28 August 2025 |
2.0.5 | 21 August 2025 |
2.0.4 | 18 August 2025 |
2.0.3 | 07 August 2025 |
2.0.2 | 30 July 2025 |
2.0.1 | 24 July 2025 |
2.0.0 | 22 July 2025 |
LokiCheckout_Core
to 2.0Yireo_Loki*
to Loki*
yireo/magento2-loki*
to loki/magento2*
getCartRepository()->save()
to getCheckoutState()->saveQuote()
account_type
in customer_address
to save value intoloki_checkout.xml
grid CSS for mobile