mollie / magento2-hyva-checkout

8 stars 7 forks source link

Add payment method icons to the checkout #1

Closed Tjitse-E closed 1 year ago

Tjitse-E commented 1 year ago

See the Hyvä docs, it's now possible (natively) to add payment method icons. Example:

CleanShot 2023-07-11 at 15 54 19

I think this should be natively included with the Mollie hyva compatibility module, so it matches the style of the Luma checkout.

Code example, after installing Hyvä payment icons:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceBlock name="checkout.payment.method.mollie_methods_ideal">
            <arguments>
                <argument name="metadata" xsi:type="array">
                    <item name="icon" xsi:type="array">
                        <item name="svg" xsi:type="string">payment/default/ideal</item>
                    </item>
                </argument>
            </arguments>
        </referenceBlock>
    </body>
</page>

This issue is that this only works for iDeal, Creditcard and Apple Pay, since those are configured in https://github.com/mollie/magento2-hyva-checkout/blob/main/src/Mollie_HyvaCheckout/view/frontend/layout/hyva_checkout_components.xml.

Frank-Magmodules commented 1 year ago

Hello @Tjitse-E, we've just rolled out a new release in which we've successfully incorporated your contributions, many thanks for that!