Using VQMod offset properly

I am creating a small VQMod for OpenCart

I want to search for a piece of code with mulitple lines however I can't figure out the right offset value to do so.

I was reading the vqmod manual and they recommend you count the ammount of lines then subtract the number of lines by 1 to determine the offset however it doesn't work for me?

Here is my code

<modification>

    <id>xxx</id>
    <version>xxx</version>
    <vqmver>xxx</vqmver>
    <author>xxx</author>

    <file name="catalog/view/theme/*/template/account/register.tpl">
        <operation>
            <search position="replace" offset="17"><![CDATA[
        <tr>
            <td><?php echo $entry_company; ?></td>
            <td><input type="text" name="company" value="<?php echo $company; ?>" class="large-field" /></td>
        </tr>
        <tr id="company-id-display">
          <td><span id="company-id-required" class="required">*</span> <?php echo $entry_company_id; ?></td>
          <td><input type="text" name="company_id" value="<?php echo $company_id; ?>" />
            <?php if ($error_company_id) { ?>
            <span class="error"><?php echo $error_company_id; ?></span>
            <?php } ?></td>
        </tr>
        <tr id="tax-id-display">
          <td><span id="tax-id-required" class="required">*</span> <?php echo $entry_tax_id; ?></td>
          <td><input type="text" name="tax_id" value="<?php echo $tax_id; ?>" />
            <?php if ($error_tax_id) { ?>
            <span class="error"><?php echo $error_tax_id; ?></span>
            <?php } ?></td>
        </tr>
        ]]></search>
            <add><![CDATA[ 
            <?php echo 'test'; ?>
        ]]></add>
        </operation>            
    </file>     


</modification>

I counted 18 lines and set my offset to 17.

Am I going wrong somewhere.

Will be great to hear back from you all Thanks Peter

Answers


Vqmods offset value is for replacing a line and the following x lines, however the search is for one line only. Vqmod doesn't match multiple lines


Need Your Help

Why is String's format(Object... args) defined as a static method?

java string format printf

I wonder why Java 5 and above provide a printf-style formatter using a static method in class String like this:

iOS 7: Delete application with grey background

ios itunes

I have problem with deletion of application with grey background: