Jump to content

[SOLVED] Need help to modify the registration form


Recommended Posts

2

turn on b2b option under preferences > customers tab in your back office

 

then open: classes/address.php

 

 

 

'company' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 64),

change it to:

 

 

'company' =>  array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 64,required' => true),
Link to comment
Share on other sites

open authentication.tpl file

you will see there:

<p class="select">
					<span>{l s='Date of Birth'}</span>
					<select id="days" name="days">
						<option value="">-</option>
						{foreach from=$days item=day}
							<option value="{$day}" {if ($sl_day == $day)} selected="selected"{/if}>{$day}  </option>
						{/foreach}
					</select>
				{*
						  {l s='January'}
						  {l s='February'}
						  {l s='March'}
						  {l s='April'}
						  {l s='May'}
						  {l s='June'}
						  {l s='July'}
						  {l s='August'}
						  {l s='September'}
						  {l s='October'}
						  {l s='November'}
						  {l s='December'}
					  *}
					<select id="months" name="months">
						<option value="">-</option>
						{foreach from=$months key=k item=month}
							<option value="{$k}" {if ($sl_month == $k)} selected="selected"{/if}>{l s=$month} </option>
						{/foreach}
					</select>
					<select id="years" name="years">
						<option value="">-</option>
						{foreach from=$years item=year}
							<option value="{$year}" {if ($sl_year == $year)} selected="selected"{/if}>{$year}  </option>
						{/foreach}
					</select>
				</p>

just remove it.

 

but remember, this field appears there (in authentication.tpl file) two times! you have to remove both!

Link to comment
Share on other sites

  • 1 month later...

Hello Vekia,

 

 Great post  http://www.bitsandchips.it/forum/viewtopic.php?f=11&t=4884 , i did followed and successfully done the job, 

 only i need is to allow admin to edit the field from the admin panel on customers edit form, please help.

 

Lots of thanks in advance for the article.

 

thank you for url to external topic, it is definitely useful :)

Link to comment
Share on other sites

  • 1 month later...

Hi Vekia,

 

I also need to make company required, but we are using the multistore feature, and I only need company to be required in one of our four shops. The shop id we need company required for is 2, and I've been trying to use the ternary operator in that multidimensional array in classes/address.php to say if the shop id is 2 then company is required, otherwise company isn't required. But I'm getting the syntax wrong or something, because it's not working (what I've tried breaks the cart such that only a white screen is displayed). Is what I'm trying to do possible and if so, can you help with the syntax?

 

Thanks in advance.

Link to comment
Share on other sites

  • 2 years 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...