Jump to content

注册时,可以去掉your address么?(I dont want "your address")


Tonyy

Recommended Posts

找到了,修改theme authentication.tpl 文件

我删掉了没用的,但是不能注册啊,总是提示
There are 5 errors :

1. country ID is required
2. alias is required
3. address (1) is required
4. postcode is required
5. city is invalid

这些都是我删掉的,如何取消这个?

Link to comment
Share on other sites

找到了,修改theme authentication.tpl 文件

我删掉了没用的,但是不能注册啊,总是提示
There are 5 errors :

1. country ID is required
2. alias is required
3. address (1) is required
4. postcode is required
5. city is invalid

这些都是我删掉的,如何取消这个?



你删掉的这些只是界面显示的部分.你还需要修改"../authentication.php"
line74--line104把控制添加地址的地方注释掉.

//$address = new Address();

//$address->id_customer = 1;

//$errors = array_unique(array_merge($errors, $address->validateControler()));

if (!sizeof($errors))

{

$customer->active = 1;

if (!$customer->add())

$errors[] = Tools::displayError('an error occurred while creating your account');

else

{

//$address->id_customer = intval($customer->id);

/*if (!$address->add())

$errors[] = Tools::displayError('an error occurred while creating your address');

else

{ */

if (Mail::Send(intval($cookie->id_lang), 'account', 'Welcome!',
array('{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => Tools::getValue('passwd')), $customer->email, $customer->firstname.' '.$customer->lastname))

$smarty->assign('confirmation', 1);

$cookie->id_customer = intval($customer->id);

$cookie->customer_lastname = $customer->lastname;

$cookie->customer_firstname = $customer->firstname;

$cookie->passwd = $customer->passwd;

$cookie->logged = 1;

$cookie->email = $customer->email;

Module::hookExec('createAccount', array(

'_POST' => $_POST,

'newCustomer' => $customer

));

if ($back)

Tools::redirect($back);

/*}*/

8076_0Vh8N7RVS2r6OA2qb0eX_t

Link to comment
Share on other sites

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...