2

Magento 2.0.10 and PHP 5.6.27

i have declare a etc\frontend\di.xlm en frondend whitch

<type name="Jbpevasion\Cartebleu\Block\Info">
    <arguments>
        <argument name="data" xsi:type="array">
            <item xsi:type="string" name="is_secure_mode">1</item>
        </argument>
    </arguments>
</type>

and in etc\adminhtml\di.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Jbpevasion\Cartebleu\Block\Info">
    <arguments>
        <argument name="data" xsi:type="array">
            <item xsi:type="string" name="is_secure_mode">0</item>
        </argument>
    </arguments>
</type>

but if i test

if (!$this->getIsSecureMode()) { .... }

i have the same for the admin et front ... I've forgotten something?

thanks

6

1 Answer 1

0

in etc\frontend\di.xml you must add

<type name="Magento\Payment\Block\Info">
    <arguments>
        <argument name="data" xsi:type="array">
            <item xsi:type="string" name="is_secure_mode">1</item>
        </argument>
    </arguments>
</type>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.