This is an add-on package to the LokiCheckout. It is only a dummy to kickstart new modules easily.
Install this package via composer (assuming you have setup the composer.yireo.com
repository correctly already):
composer require yireo/magento2-loki-checkout-dev-profiles
Next, enable this module:
bin/magento module:enable Yireo_LokiCheckoutDevProfiles
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 Yireo\LokiCheckoutDevProfiles\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="Yireo\LokiCheckoutDevProfiles\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/Yireo_LokiCheckoutDevProfiles
The following dependencies are declared in the module its `etc/module.xml` file:
Yireo_LokiCheckout
Yireo_LokiCheckoutDevProfiles
yireo/magento2-loki-checkout-dev-profiles
magento/framework: ^103.0
yireo/magento2-loki-checkout: ~0.0
dev-main | 16 April 2025 |
0.0.2 | 16 April 2025 |
0.0.1 | 08 April 2025 |