cancel
Showing results for 
Search instead for 
Did you mean: 

IsSecureMode di.xml frontend / backend don't work

SOLVED

IsSecureMode di.xml frontend / backend don't work

Hi,

 

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

1 ACCEPTED SOLUTION

Accepted Solutions

Re: IsSecureMode di.xml frontend / backend don't work

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>

View solution in original post

1 REPLY 1

Re: IsSecureMode di.xml frontend / backend don't work

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>