Jump to content

可以去掉address地址验证吗?(I dont want "your address")


Recommended Posts

大家好,向各位大大请教个问题啊。

 

因为我销售的是不需要寄送的物品,所以用户注册时不需要填一堆东西,唯一只需要填的就是Email地址。

 

我在theme目录下找到了address.tpl文件,去掉了界面上的如下内容: 地址(address)、国家(country)、城市(city)、邮编(zip code)、电话(phone)。

 

结果address添加不进去了,点击save保存时提示如下错误:

 

  1. address (1) is required.
  2. city is required.
  3. You must register at least one phone number.
  4. This country requires you to chose a State.
  5. The Zip/Postal code you've entered is invalid. It must follow this format: 00000

再后来自己在controllers -> front -> AddressController.php文件中找到了相应的验证代码,用于检验这些东西输入的,我把它注释掉了。

 

结果发现,点击save保存后,就没反应了。

 

我的prestashop版本为PrestaShop™ 1.5.6.2

请教各位大大:

我只需要留一个FirstName, LastName, Email给用户填,其余全不要。我该正确地注释掉哪些内容?!

Share this post


Link to post
Share on other sites
  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More