2015-06-23 49 views

回答

2
  1. 搜索帳戶/ register.tpl領域,並刪除它。
  2. 如果該字段是強制性的,您還必須在註冊控制器中搜索它並從validate()函數中刪除其驗證。
+0

感謝阿里。我如何找到控制器? – user3385915

+0

它位於controller/account/register.php中。 –

+0

謝謝!它的排序。該過程是您從視圖中刪除並從控制器中刪除,以避免錯誤。 – user3385915

2

可以使新文件

刪除 - fields.ocmod.xml

,並把這個代碼

<?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> 
相關問題