I wrote some script to remove some fields from the payment_address.tpl and payment_address.php but it is not running. I have another vqmod running and it is working fine. The logs and cache have references to the vqmod that is working but not the script that I have wrote so I cannot even check for an error.
Interestingly, I installed a vqmod manager for the admin dashboard which shows the script i wrote is installed. I cant figure out why it is not running
Code: Select all
<modification>
<id><![CDATA[Remove unnecessary checkout fields for opencart]]></id>
<version><![CDATA[1.0]]></version>
<opencart><![CDATA[2.2]]></opencart>
<vqmver><![CDATA[2.6]]></vqmver>
<author><![CDATA[Daniel]]></author>
<file path="catalog/controller/checkout/" name="payment_address.php">
<operation info="remove validate of lastname" error="abort" >
<search position="replace" offset="2" ><![CDATA[
if ((utf8_strlen(trim($this->request->post['lastname'])) < 1) || (utf8_strlen(trim($this->request->post['lastname'])) > 32)) {
]]></search>
<add><![CDATA[
]]></add>
</operation>
<operation info="remove validate of telephone" error="abort" >
<search position="replace" offset="2"><![CDATA[
if ((utf8_strlen($this->request->post['telephone']) < 3) || (utf8_strlen($this->request->post['telephone']) > 32)) {
]]></search>
<add><![CDATA[
]]></add>
</operation>
<operation info="remove validate of address_1" error="abort" >
<search position="replace" offset="2" ><![CDATA[
if ((utf8_strlen(trim($this->request->post['address_1'])) < 3) || (utf8_strlen(trim($this->request->post['address_1'])) > 128)) {
]]></search>
<add><![CDATA[
]]></add>
</operation>
<operation info="remove validate of city" error="abort" >
<search position="replace" offset="2" ><![CDATA[
if ((utf8_strlen(trim($this->request->post['city'])) < 2) || (utf8_strlen(trim($this->request->post['city'])) > 128)) {
]]></search>
<add><![CDATA[
]]></add>
</operation>
<operation info="remove validate of postcode" error="abort" >
<search position="replace" offset="2" ><![CDATA[
if ($country_info && $country_info['postcode_required'] && (utf8_strlen(trim($this->request->post['postcode'])) < 2 || utf8_strlen(trim($this->request->post['postcode'])) > 10)) {
]]></search>
<add><![CDATA[
]]></add>
</operation>
<operation info="remove validate of zone_id" error="log" >
<search position="replace" offset="2" ><![CDATA[
if (!isset($this->request->post['zone_id']) || $this->request->post['zone_id'] == '') {
]]></search>
<add><![CDATA[
]]></add>
</operation>
<operation info="remove validate of zone_id Opencart 2102" error="log" >
<search position="replace" offset="2" ><![CDATA[
if (!isset($this->request->post['zone_id']) || $this->request->post['zone_id'] == '' || !is_numeric($this->request->post['zone_id'])) {
]]></search>
<add><![CDATA[
]]></add>
</operation>
<operation info="remove validate of zone_id. for some builds of Opencart" error="log" >
<search position="replace" offset="2" ><![CDATA[
if ($this->request->post['zone_id'] == '') {
]]></search>
<add><![CDATA[
]]></add>
</operation>
<operation info="remove validate of country_id" error="abort" >
<search position="replace" offset="2"><![CDATA[
if ($this->request->post['country_id'] == '') {
]]></search>
<add><![CDATA[
]]></add>
</operation>
<operation info="Set checkbox Subscribe Newsletter checked default" error="abort" >
<search position="replace" ><![CDATA[
$data['newsletter'] = '';
]]></search>
<add><![CDATA[
$data['newsletter'] = '1';
]]></add>
</operation>
</file>
<file path="catalog/view/theme/default/template/checkout/" name="payment_address.tpl">
<operation info="Default. telephone fields" error="log">
<search position="replace" offset="-1" ><![CDATA[
<label class="col-sm-2 control-label" for="input-telephone"><?php echo $entry_telephone; ?></label>
]]></search>
<add><![CDATA[
<div class="form-group">
<label class="col-sm-2 control-label" for="input-telephone"><?php echo $entry_telephone; ?></label>
]]></add>
</operation>
<operation info="Default. Hide fax" error="log">
<search position="replace" offset="-1" ><![CDATA[
<label class="col-sm-2 control-label" for="input-fax"><?php echo $entry_fax; ?></label>
]]></search>
<add><![CDATA[
<div class="form-group" style="display:none">
<label class="col-sm-2 control-label" for="input-fax"><?php echo $entry_fax; ?></label>
]]></add>
</operation>
<operation info="Default. hide Address block" error="log" >
<search position="replace" ><![CDATA[
<fieldset id="address">
]]></search>
<add><![CDATA[
<fieldset id="address" style="display:none">
]]></add>
</operation>
<operation info="Default. Set checkbox Agree Privacy Policy checked default" error="log" >
<search position="replace" ><![CDATA[
<input type="checkbox" name="agree" value="1" />
]]></search>
<add><![CDATA[
<input type="checkbox" name="agree" value="1" checked="checked" />
]]></add>
</operation>
<operation info="Default. remove text Your Password" error="log" >
<search position="replace" ><![CDATA[
<legend><?php echo $text_your_password; ?></legend>
]]></search>
<add><![CDATA[
]]></add>
</operation>
</file>
</modification>
vqmod 2.6