Home

Awesome

Aimes_CheckoutDesigns

"Supported Magento Version" "Latest Release"

Features

This module provides the ability to change checkout page designs/layout similar to page specific selectable layouts.

The module currently provides the following functionality:

<details> <summary>Example Config</summary>

Example Config

</details>

This in turn will allow you to do things such as, but not limited to, the following:

Please note: These are only examples of functionality that this module makes possible. This module itself does not provide any additional functionality and serves only as a base for other modules. For example usage, please see Aimes_CheckoutDesignsExample.

Any feature requests and/or pull requests are welcomed!

Requirements

Installation

Please install this module via Composer. This module is hosted on Packagist.

Usage

Step 1: Define new checkout layout

di.xml

<virtualType name="Vendor\Module\Model\Checkout\Design\MyDesign"
             type="Aimes\CheckoutDesigns\Model\CheckoutDesign">
    <arguments>
        <argument name="code" xsi:type="string">my_design_code</argument>
        <argument name="name" xsi:type="string">My Design Name</argument>
        <argument name="layoutHandle" xsi:type="string">my_design_layout_handle</argument>
        <argument name="layoutProcessors" xsi:type="array">
            <item name="defaultProcessor" xsi:type="object">
                <!-- Object must implement \Magento\Checkout\Block\Checkout\LayoutProcessorInterface -->
            </item>
        </argument>
        <argument name="configProviders" xsi:type="array">
            <item name="defaultProvider" xsi:type="object">
                <!-- Object must implement \Magento\Checkout\Model\ConfigProviderInterface -->
            </item>
        </argument>
    </arguments>
</virtualType>

Explanation

Example code

For working code examples, please refer to Aimes_CheckoutDesignsExample. This package can also be installed.

Step 2: Add your design to the available options

di.xml

<type name="Aimes\CheckoutDesigns\Model\Config\Source\CheckoutDesigns">
    <arguments>
        <argument name="designs" xsi:type="array">
            <item name="my_design" xsi:type="object">
                Vendor\Module\Model\Checkout\Design\MyDesign
            </item>
        </argument>
    </arguments>
</type>

Step 3: Select design

Your design should now show up as an option in the system configuration below:

Sales -> Checkout -> Design / Layout -> Checkout Design

Licence

GPLv3 © Rob Aimes