【发布时间】:2018-04-24 12:47:01
【问题描述】:
我尝试使用来自
的 phtml 文件覆盖块供应商\magento\module-checkout\view\frontend\success.phtml
到我的文件
app\code\Custom\Module\view\frontend\checkout\success.phtml
xml 文件是 checkout_onepage_success.xml
<referenceBlock name="checkout.success">
<action method="setTemplate" ifconfig="custom_general/general/active">
<argument name="template" xsi:type="string">Custom_Module::checkout/success.phtml</argument>
</action>
</referenceBlock>
当我从配置中启用模块时,然后使用我的块和 phtml 文件执行。
当禁用模块时,执行默认文件并阻塞。
但是当我从配置中禁用模块时,默认文件和块不会执行。
请帮助我解决这个问题
提前致谢。
【问题讨论】:
标签: php xml magento magento2 magento2.1