This Magento 2 module is an add-on package to the LokiCheckout. It adds the option to select a profile in a selectbox and then autofill all values with one HTTP request.
Install this package via composer:
composer require loki-checkout/magento2-dev-profiles
Next, enable this module:
bin/magento module:enable LokiCheckout_DevProfiles
To create a new profile, add a class like the following. The example assumes a module YireoTraining_ExampleLokiCheckoutProfile
. Make sure to implement the ProfileInterface
.
<?php
declare(strict_types=1);
namespace YireoTraining\ExampleLokiCheckoutProfile\Profile;
use LokiCheckout\DevProfiles\Profile\ProfileInterface;
class JohnDoeProfile implements ProfileInterface
{
public function getCode(): string
{
return 'john_doe';
}
public function getLabel(): string
{
return 'John Doe';
}
public function getAddressValues(): array
{
return [
'firstname' => 'John',
'lastname' => 'Doe',
];
}
public function getEmailAddress(): string
{
return 'john@example.com';
}
}
Next, register this profile with a di.xml
file:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="LokiCheckout\DevProfiles\Profile\ProfileListing">
<arguments>
<argument name="profiles" xsi:type="array">
<item name="john_doe_profile" xsi:type="object">YireoTraining\ExampleLokiCheckoutProfile\Profile\JohnDoeProfile</item>
</argument>
</arguments>
</type>
</config>
After refreshing the cache, the new profile should appear in the profile selection box.
For getting support, create an Issue under the following project URL:
https://gitlab.yireo.com/loki-checkout/LokiCheckout_DevProfiles
The following LokiComponents are created or references in this module:
loki-checkout-dev-profiles.profile-switcher
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_CatalogInventory
Magento_Checkout
Magento_CheckoutAgreements
Magento_Config
Magento_Customer
Magento_Directory
Magento_Eav
Magento_Newsletter
Magento_Payment
Magento_Quote
Magento_Sales
Magento_Shipping
Magento_Store
Magento_Vault
Yireo_CspUtilities
Yireo_HyvaThemeAutoRegistration
LokiCheckout_DevProfiles
loki-checkout/magento2-dev-profiles
loki-checkout/magento2-core: ^2.0
loki/magento2-components: ^2.0
loki/magento2-css-utils: ^1.0
magento/framework: ^103.0
magento/module-checkout: ^100.0
magento/module-quote: ^101.0
magento/module-store: ^101.0
dev-main#d0ad6031fed5bf26755211d01495a3d52d7ba41b | 20 October 2025 |
2.0.5 | 20 October 2025 |
2.0.4 | 20 October 2025 |
2.0.3 | 20 October 2025 |
2.0.2 | 20 October 2025 |
2.0.1 | 20 October 2025 |
2.0.0 | 20 October 2025 |
1.0.0 | 20 October 2025 |
0.0.3 | 20 October 2025 |
0.0.2 | 20 October 2025 |
0.0.1 | 20 October 2025 |
Yireo_Loki*
to Loki*
yireo/magento2-loki*
to loki/magento2*
LokiCheckout_Core to 2.0.0