So I'm trying to edit this file by adding some lines of code and commenting out something else. I created an xml file and added this:
<file name="catalog/view/theme/VARNA/template/common/VARNA_menu.php">
<operation>
<search position="before" offset="0"><![CDATA[
if(($this->config->get('VARNAControl_status') == '1') && ( $this->config->get('VARNAControl_information_link') == '1')){
]]></search>
<add><![CDATA[
$output .= '<li class="info_link top_cat"><a href="#">'."Features".'</a><ul class="children">';
foreach ($features as $feature) {
$output .= '<li class="subcat"><a href="'.$feature['href'].'">' . $feature['title'] . '</a></li>';
}
$output .= '</ul></li>';
]]></add>
</operation>
</file>
<file name="catalog/view/theme/VARNA/template/common/VARNA_menu.php">
<operation>
<search position="before" offset="0"><![CDATA[
if(($this->config->get('VARNAControl_status') == '1') && ( $this->config->get('VARNAControl_information_link') == '1')){
]]></search>
<add><![CDATA[
/*
]]></add>
</operation>
</file>
<file name="catalog/view/theme/VARNA/template/common/VARNA_menu.php">
<operation>
<search position="before" offset="0"><![CDATA[
if(($this->config->get('VARNAControl_status') == '1') && ( $this->config->get('VARNAControl_custom_menu_1') != null)){
]]></search>
<add><![CDATA[
*/
]]></add>
</operation>
</file>
The first section is just to add, and the 2 bottom sections is to comment out another section of code already in the file. However, the changes does not get implemented.. I have plenty of other xml files that work without any issues, but for some reason, this particular one does nothing. If I manually change the file with the code I'm adding, it works fine.. Is there something wrong with my syntax here?
The reason for this is almost certainly due to whatever is including the custom file not running it through VQMod::modCheck()
. You need to find where the files for VARNA_menu.[php|tpl]
are being included/required and run them through VQMod::modCheck()
, ensuring you pass the full path to the file