RadarsofthouseDev / billwerk-plus-pay-for-magento2

Billwerk+ Pay for Magento 2
GNU General Public License v3.0
1 stars 12 forks source link

Problem with logo path in embedded display mode #16

Closed ttbcsdm closed 1 year ago

ttbcsdm commented 1 year ago

In embedded mode, the logo from design config is ignored and using "images/logo.svg" as fallback (luma theme logo). It looks like "Magento\Theme\ViewModel\Block\Html\Header\LogoPathResolver" is not being used on the logo block.

Magento: 2.4.6 Reepay module: 1.2.34

Edit: We fixed it with the following di code:

    <type name="Radarsofthouse\Reepay\Block\Standard\Redirect">
        <arguments>
            <argument name="logo" xsi:type="object">reepayEmbeddedLogoPathResolver</argument>
        </arguments>
    </type>
    <virtualType name="reepayEmbeddedLogoPathResolver" type="Magento\Theme\Block\Html\Header\Logo">
        <arguments>
            <argument name="data" xsi:type="array">
                <item name="logoPathResolver" xsi:type="object">Magento\Theme\ViewModel\Block\Html\Header\LogoPathResolver</item>
            </argument>
        </arguments>
    </virtualType>
RadarsofthouseDev commented 1 year ago

@ttbcsdm Thank you for the issue report. Unfortunately, we cannot use the XML solution as it would not be compatible with older versions of Magento. However, we have updated the module to version 1.2.35 and made it compatible with both older and newer versions of Magento.