I am trying to remove some fields from opencart 2.0x checkout and registration page, like fax, postal code. I can't seem to find the right extension so I'd like to go editing from the code level.
Can anyone guide me to a starting point?
I am trying to remove some fields from opencart 2.0x checkout and registration page, like fax, postal code. I can't seem to find the right extension so I'd like to go editing from the code level.
Can anyone guide me to a starting point?
You can make new file
remove-fields.ocmod.xml
and put this code
<?xml version="1.0" encoding="utf-8"?>
<modification>
<name>Remove Field From Checkout Page</name>
<code>removeextrafield</code>
<version>1.0</version>
<author>Anuj Khandelwal</author>
<link>http://themextension.com</link>
<file path="catalog/view/theme/*/template/account/register.tpl">
<operation>
<search index="2"><![CDATA[
<div class="form-group">
]]></search>
<add position="replace"><![CDATA[
<div class="form-group" style="display: none;>
]]></add>
</operation>
</file>
<file path="catalog/view/theme/*/template/account/address_form.tpl">
<operation>
<search index="1"><![CDATA[
<div class="form-group">
]]></search>
<add position="replace"><![CDATA[
<div class="form-group" style="display: none;>
]]></add>
</operation>
</file>
<file path="catalog/view/theme/*/template/affiliate/{edit,register}.tpl">
<operation>
<search index="3"><![CDATA[
<div class="form-group">
]]></search>
<add position="replace"><![CDATA[
<div class="form-group" style="display: none;>
]]></add>
</operation>
<operation>
<search><![CDATA[
$entry_address_1;
]]></search>
<add position="replace" trim="true"><![CDATA[
$text_your_address;
]]></add>
</operation>
</file>
<file path="catalog/view/theme/*/template/checkout/{guest_shipping,payment_address,shipping_address}.tpl">
<operation>
<search index="1"><![CDATA[
<div class="form-group">
]]></search>
<add position="replace"><![CDATA[
<div class="form-group" style="display: none;>
]]></add>
</operation>
</file>
<file path="catalog/view/theme/*/template/checkout/{guest_shipping,payment_address,shipping_address}.tpl">
<operation>
<search index="1"><![CDATA[
<div class="form-group">
]]></search>
<add position="replace"><![CDATA[
<div class="form-group" style="display: none;>
]]></add>
</operation>
</file>
<file path="catalog/view/theme/*/template/checkout/{register,guest}.tpl">
<operation>
<search><![CDATA[
<div class="form-group">
]]></search>
<add position="replace"><![CDATA[
<div class="form-group" style="display: none;>
]]></add>
</operation>
</file>
<file path="catalog/view/theme/*/template/account/{register,address_form}.tpl">
<operation>
<search><![CDATA[
$entry_address_1;
]]></search>
<add position="replace" trim="true"><![CDATA[
$text_your_address;
]]></add>
</operation>
</file>
<file path="catalog/view/theme/*/template/checkout/{register,guest,guest_shipping,payment_address,shipping_address}.tpl">
<operation>
<search><![CDATA[
$entry_address_1;
]]></search>
<add position="replace" trim="true"><![CDATA[
$text_your_address;
]]></add>
</operation>
</file>
</modification>