0

opencart 用のモジュールを作成しました。デフォルトのテンプレート ファイルと php ファイルを変更する必要があるため、VQMOD を使用しました。VQMOD Managerは正しく実行されていますが、追加したスクリプトは追加されていません。

以下サンプルコード。

<modification>
    <id>demo</id>
    <version>1.1</version>
    <vqmver>2.3.0</vqmver>
    <author>http://www.demo.com</author>
    <file path="admin/controller/common/" name="header.php">
        <operation>
            <search position="after">
                <![CDATA[$this->data['text_zone'] = $this->language->get('text_zone');]]>
            </search>
            <add>
                <![CDATA[

                $this -> data['text_design_category'] = $this -> language -> get('text_design_category');
                $this -> data['text_rawproduct'] = $this -> language -> get('text_rawproduct');
                $this -> data['text_font'] = $this -> language -> get('text_font');
                $this -> data['text_color'] = $this -> language -> get('text_color');
                $this -> data['text_screen_color'] = $this -> language -> get('text_screen_color');
                $this -> data['text_productdesigner'] = 'Product Designer';
                ]]>
            </add>
        </operation>
</file>
</modification>
4

1 に答える 1

0

<file name="admin/controller/common/header.php"> の代わりにこの行のみを置き換える必要があります<file path="admin/controller/common/" name="header.php">

以下のコードを試してください。

<modification>
        <id>demo</id>
        <version>1.1</version>
        <vqmver>2.3.0</vqmver>
        <author>http://www.demo.com</author>
        <file name="admin/controller/common/header.php">
            <operation>
                <search position="after">
                    <![CDATA[$this->data['text_zone'] = $this->language->get('text_zone');]]>
                </search>
                <add>
                    <![CDATA[

                    $this -> data['text_design_category'] = $this -> language -> get('text_design_category');
                    $this -> data['text_rawproduct'] = $this -> language -> get('text_rawproduct');
                    $this -> data['text_font'] = $this -> language -> get('text_font');
                    $this -> data['text_color'] = $this -> language -> get('text_color');
                    $this -> data['text_screen_color'] = $this -> language -> get('text_screen_color');
                    $this -> data['text_productdesigner'] = 'Product Designer';
                    ]]>
                </add>
            </operation>
    </file>
    </modification>
于 2014-05-13T11:36:17.363 に答える