美文网首页
麦进斗magento覆盖模板失败

麦进斗magento覆盖模板失败

作者: 麦进斗科技 | 来源:发表于2016-10-17 15:23 被阅读0次

步骤1)使扩展指定的应用程序/ etc文件夹config.php文件

array ( 'Learning_RewriteSales' => 1, ), );

步骤2)在块创建custom.php类

步骤3)创建php文件扩展核心php

步骤4)创建di.xml文件来指定你的扩展类(依赖注入)

步骤5)创建一个module.xml文件指定安装版

步骤6)创建sales_order_view.xml文件从学习/ rewritesales /观点/布局文件夹写下面的代码

order/view/info.phtml

步骤7)从Learning/RewriteSales/view/layout和插入下面的代码创建custom.phtml和info.phtml文件。

首先复制代码从Magento\Sales\view\adminhtml\templates\order\view\info.phtml文件和过去在这里,再加上一行

<?php echo$block-> getchildhtml('sales_order_view_custom”);?>

相关文章

网友评论

      本文标题:麦进斗magento覆盖模板失败

      本文链接:https://www.haomeiwen.com/subject/shxzyttx.html