MultiSafepay / Magento2Msp

MultiSafepay plugin for Magento 2 (Deprecated) see: https://github.com/MultiSafepay/magento2
Open Software License 3.0
29 stars 25 forks source link

Translate payment method titles broken in 2.3 #96

Closed basvanpoppel closed 3 years ago

basvanpoppel commented 5 years ago

On a Magento2.3 instance, the payment method titles cannot be translated. In all stores it will display the payment method title of the default store.

The current implementation is relying on deprecated code, so I'm not creating a PR because a refactor is needed.

I have created a 'fix' though, which I'm happy to share:

In Multisafepay\Connect\Model\Connect add the following function:

    public function getTitle()
    {
        return $this->_scopeConfig->getValue(
            'gateways/' . $this->getCode() . '/title',
            \Magento\Store\Model\ScopeInterface::SCOPE_STORE,
            $this->_storeManager->getStore()->getId()
        );

    }
Jasper-MultiSafepay commented 5 years ago

@basvanpoppel Thank you for the suggestion! We are currently refactoring to support better names for the payment methods. I'll discuss and see if your fix could be included in the current refactor session.

thlassche commented 5 years ago

@basvanpoppel @Jasper-MultiSafepay Workaround is to set the payment method active on system level by changing config.xml, the <payment> section. E.g.:

       <payment>
            <!-- Start iDEAL -->
            <ideal>
                <active>0</active>
                <title>iDEAL</title>
                <instructions>Veilig betalen met iDEAL</instructions>
                <allowed_currency>EUR</allowed_currency>
                <allowed_groups>0,1,2,3</allowed_groups>
                <payment_action>true</payment_action>
                <model>MultiSafepay\Connect\Model\Gateways\Ideal</model>
                <group>multisafepay_connect</group>
            </ideal>

Becomes (see the active tag):

       <payment>
            <!-- Start iDEAL -->
            <ideal>
                <active>1</active>
                <title>iDEAL</title>
                <instructions>Veilig betalen met iDEAL</instructions>
                <allowed_currency>EUR</allowed_currency>
                <allowed_groups>0,1,2,3</allowed_groups>
                <payment_action>true</payment_action>
                <model>MultiSafepay\Connect\Model\Gateways\Ideal</model>
                <group>multisafepay_connect</group>
            </ideal>
mikededecker1 commented 5 years ago

@basvanpoppel For now, we can't reproduce this issue. The translation for each payment method works as it should.

Is it possible that you can give us reproduction steps, so that we can follow the exact steps?

vinodsowdagar commented 3 years ago

Hi @basvanpoppel ,

Thank you for reporting this.

Unfortunately, this plugin is deprecated and we are not providing support for it anymore. Please upgrade to our New Magento 2 plugin..

This issue has not occurred in the new plugin and the new plugin also has tons of other improvements. I am closing this issue for now. If you have any more comments or questions, feel free to create a new issue in the new plugin repo.