dongtu0088 2016-04-18 09:24
浏览 85
已采纳

如何在vQmod中指定要忽略的文件 - Opencart 1.5

I am working on a payment module for an OpenCart 1.5 site, but there is a vQmod installed that adds a table row with an option for all payment modules. However, the way the vQmod is set up is such that it add these rows just before the </table> tag but because there are two tables on my payment module settings page, it adds the row twice.

<file name="admin/view/template/payment/*.tpl">
    <operation error="skip">
        <search position="before" index="1"><![CDATA[
            </table>
        ]]></search>
        <ignoreif><![CDATA[
            Braintree Payment Gateway v156.4
        ]]></ignoreif>
        <add><![CDATA[
            <tr>
                <td><?php echo $entry_paid_status; ?></td>
                <td>
                    <?php if ($field_value) { ?>
                        <input type="radio" name="<?php echo $classname; ?>_paid_status" value="1" checked="checked" /><?php echo $text_paid; ?>
                        <input type="radio" name="<?php echo $classname; ?>_paid_status" value="0" /><?php echo $text_unpaid; ?>
                    <?php } else { ?>
                        <input type="radio" name="<?php echo $classname; ?>_paid_status" value="1" /><?php echo $text_paid; ?>
                        <input type="radio" name="<?php echo $classname; ?>_paid_status" value="0" checked="checked" /><?php echo $text_unpaid; ?>
                    <?php } ?>
                </td>
            </tr>
        ]]></add>
    </operation>

    ...

</file>

Basically, it adds a row for something called 'Paid Status' - which isn't really needed for my payment module, but it's not a problem if it is added - but since it adds it before </table> and my module has this tag twice, it gets added twice.

I have noticed the <ignoreif> tag - but I'm not sure how this works (I'm not overly familiar with vQmods) I tried adding the name of my payment module in there, but it makes no difference.

Basically what I'm asking is, is there any way to exclude this code from being added to my module? Before anyone suggests, I can't take out the tables, they are needed for this page.

Thank you

  • 写回答

1条回答 默认 最新

  • doumengwei0138 2016-04-18 09:40
    关注

    ignoreif is used to ignore an operation if the code/string in ignoreif tag is found in file.

    Please find the below sample code:

    <modification>
        <id><![CDATA[###Description/Title###]]></id>
        <version><![CDATA[###Our code version (Usually specifies plugin/extension version)###]]></version>
        <vqmver><![CDATA[###Vqmod version###]]></vqmver>
        <author><![CDATA[###Author's Name###]]></author>
        <file path="###Folder path###" name="###File name###" >
            <operation info="###Operation Info###" >
                <search position="###Search/Replace filter###" offset="0">    
                    <![CDATA[###Search Code###]]>
                </search>
                <ignoreif regex="false" ><![CDATA[
                    ###Add Code###
                ]]></ignoreif>
                <add><![CDATA[
                    ###Add Code###
                ]]></add>
            </operation>
        </file>
    </modification> 
    

    Reference url: Opencart: Vqmod tutorial

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 【急】在线问答CNC雕刻机的电子电路与编程
  • ¥60 在mc68335芯片上移植ucos ii 的成功工程文件
  • ¥15 笔记本外接显示器正常,但是笔记本屏幕黑屏
  • ¥15 Python pandas
  • ¥15 蓝牙硬件,可以用哪几种方法控制手机点击和滑动
  • ¥15 生物医学数据分析。基础课程就v经常唱课程舅成牛逼
  • ¥15 云环境云开发云函数对接微信商户中的分账功能
  • ¥15 空间转录组CRAD遇到问题
  • ¥20 materialstudio计算氢键脚本问题
  • ¥15 有没有代做有偿主要做数据可视化部分即可(2023全国高考更省一本线理科类)