无法使用Ocmod修改树枝文件-OPENCART

时间:2020-07-31 14:59:50

标签: twig opencart opencart-3 ocmod

<?xml version="1.0" encoding="utf-8"?>
        <modification>
        <name>Testing</name>
        <code>testing_ocmod</code>
        <version>1.0.0</version>
        <author>Vladut</author>
        <link>https://google.ro</link>
    
        <file path="catalog/view/theme/*/template/common/header.twig">
            <operation>
                <search><![CDATA[</header>]]></search>
                <add position="before"><![CDATA[
                    <script>
                        console.log('testing');
                    </script>
                ]]></add>
            </operation>
        </file>
    
        <file path="catalog/view/theme/*/template/product/product.twig">
            <operation>
                <search><![CDATA[{{ footer }}]]></search>
                <add position="before"><![CDATA[
                    <h1>teeeest</h1>
                ]]></add>
            </operation>
        </file>
    
    </modification>

我这里有2个文件。第一个文件是可编辑的,而第二个文件则不可。

我尝试了很多技巧来解决该问题,但是没有运气。

对此问题有一些提示吗?我不知道为什么只能修改第一个文件而不能修改第二个文件。 :(

我已经尝试过:

  • 从存储中删除缓存/修改
  • 从仪表板中删除缓存
  • 刷新修改
  • 尝试指定不带通配符的文件路径。
  • 这个ocmod有很多技巧。

其他信息: 带有日志3的Opencart v。3.0.3.3

1 个答案:

答案 0 :(得分:1)

日记3具有它自己的缓存。您是否也尝试过刷新?在日记设置的任何页面上。

尽管尝试查看OCMOD日志中的内容(在管理面板的“修改”页面上)。

尽管尝试在系统/存储/修改中打开所需的文件目录/视图/主题/*/template/product/product.twig,看看是否有其他修改对其进行了修改?

Twig cache cleaning