View Single Post
  #86  
Old 11-02-2012, 08:04 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Additional fields for address book

6. open skin/common_files/main/address_fields.tpl and find

{if $address_fields.lastname.avail eq 'Y'}
<tr>
<td class="data-name"><label for="lastname{$id}">{$lng.lbl_last_name}</label></td>
<td{if $address_fields.lastname.required eq 'Y'} class="data-required"{/if}>{if $address_fields.lastname.required eq 'Y'}*{/if}</td>
<td>
<input type="text" id="lastname{$id}" name="address_book[{$id}][lastname]" size="32" maxlength="128" value="{$address.lastname|escape}" />
</td>
</tr>
{/if}

and after add

{* added by CFL Systems for company name *}
{if $address_fields.company.avail eq 'Y'}
<tr>
<td class="data-name"><label for="company{$id}">{$lng.lbl_company}</label></td>
<td{if $address_fields.company.required eq 'Y'} class="data-required"{/if}>{if $address_fields.company.required eq 'Y'}*{/if}</td>
<td>
<input type="text" id="company{$id}" name="address_book[{$id}][company]" size="32" maxlength="128" value="{$address.company|escape}" />
</td>
</tr>
{/if}
{* added by CFL Systems for company name *}


7. open skin/common_files/customer/main/address_fields.tpl and find

{if $default_fields.lastname.avail eq 'Y'}
<tr>
<td class="data-name"><label for="{$id_prefix}lastname">{$lng.lbl_last_name}</label></td>
<td{if $default_fields.lastname.required eq 'Y'} class="data-required">*{else}>&nbsp;{/if}</td>
<td>
<input type="text" id="{$id_prefix}lastname" name="{$name_prefix}[lastname]" size="32" maxlength="128" value="{$address.lastname|escape}" />
</td>
</tr>
{/if}

and after add

{* added by CFL Systems for company name *}
{if $default_fields.company.avail eq 'Y'}
<tr>
<td class="data-name"><label for="{$id_prefix}company">{$lng.lbl_company}</label></td>
<td{if $default_fields.company.required eq 'Y'} class="data-required">*{else}>&nbsp;{/if}</td>
<td>
<input type="text" id="{$id_prefix}company" name="{$name_prefix}[company]" size="32" maxlength="128" value="{$address.company|escape}" />
</td>
</tr>
{/if}
{* added by CFL Systems for company name *}


8. open skin/common_files/customer/main/address_details_html.tpl and find

{if $default_fields.lastname and $address.lastname ne ''}{$address.lastname|escape}{/if}

and after add

{* added by CFL Systems for company name *}
{if $default_fields.company and $address.company ne ''}<br/>{$address.company|escape}{/if}
{* added by CFL Systems for company name *}


9. open skin/common_files/mail/html/order_invoice.tpl and find

{if $_userinfo.default_address_fields.lastname}
<tr>
<td><strong>{$lng.lbl_last_name}:</strong> </td>
<td>{$order.b_lastname|escape}</td>
</tr>
{/if}

after add

{* added by CFL Systems for company name *}
{if $_userinfo.default_address_fields.company}
<tr>
<td><strong>{$lng.lbl_company}:</strong> </td>
<td>{$order.b_company|escape}</td>
</tr>
{/if}
{* added by CFL Systems for company name *}

then find

{if $_userinfo.default_address_fields.lastname}
<tr>
<td><strong>{$lng.lbl_last_name}:</strong> </td>
<td>{$order.s_lastname|escape}</td>
</tr>
{/if}

and after add

{* added by CFL Systems for company name *}
{if $_userinfo.default_address_fields.company}
<tr>
<td><strong>{$lng.lbl_company}:</strong> </td>
<td>{$order.s_company|escape}</td>
</tr>
{/if}
{* added by CFL Systems for company name *}


10. open skin/common_files/main/order_info.tpl and find

{if $customer.default_address_fields.lastname}
<tr valign="top">
<td>&nbsp;&nbsp;{$lng.lbl_last_name}</td>
<td>{$customer.b_lastname|escape}</td>
</tr>
{/if}

after add

{* added by CFL Systems for company name *}
{if $customer.default_address_fields.company}
<tr valign="top">
<td>&nbsp;&nbsp;{$lng.lbl_company}</td>
<td>{$customer.b_company|escape}</td>
</tr>
{/if}
{* added by CFL Systems for company name *}

then find

{if $customer.default_address_fields.lastname}
<tr valign="top">
<td>&nbsp;&nbsp;{$lng.lbl_last_name}</td>
<td>{$customer.s_lastname|escape}</td>
</tr>
{/if}

and after add

{* added by CFL Systems for company name *}
{if $customer.default_address_fields.company}
<tr valign="top">
<td>&nbsp;&nbsp;{$lng.lbl_company}</td>
<td>{$customer.s_company|escape}</td>
</tr>
{/if}
{* added by CFL Systems for company name *}


11. open skin/common_files/modules/Advanced_Order_Management/edit_customer.tpl and find

{if $address_fields.lastname.avail eq 'Y'}
<tr{cycle name=c2 values=', class="TableSubHead"'}>
<td>{$lng.lbl_last_name}</td>
<td><input type="text" name="customer_info[b_lastname]" size="32" maxlength="128" value="{$cart_customer.b_lastname|escape}" /></td>
<td>{$customer.b_lastname}</td>
</tr>
{/if}

and after add

{* added by CFL Systems for company name *}
{if $address_fields.company.avail eq 'Y'}
<tr{cycle name=c2 values=', class="TableSubHead"'}>
<td>{$lng.lbl_company}</td>
<td><input type="text" name="customer_info[b_company]" size="32" maxlength="128" value="{$cart_customer.b_company|escape}" /></td>
<td>{$customer.b_company}</td>
</tr>
{/if}
{* added by CFL Systems for company name *}

then find

{if $address_fields.phone.avail eq 'Y'}
<tr{cycle name=c4 values=', class="TableSubHead"'}>
<td>{$lng.lbl_phone}</td>
<td><input type="text" name="customer_info[b_phone]" size="32" maxlength="32" value="{$cart_customer.b_phone|escape}" /></td>
<td>{$customer.s_phone}</td>
</tr>
{/if}
{if $address_fields.fax.avail eq 'Y'}
<tr{cycle name=c4 values=', class="TableSubHead"'}>
<td>{$lng.lbl_fax}</td>
<td><input type="text" name="customer_info[b_fax]" size="32" maxlength="32" value="{$cart_customer.b_fax|escape}" /></td>
<td>{$customer.s_fax}</td>
</tr>
{/if}

and change to

{if $address_fields.phone.avail eq 'Y'}
<tr{cycle name=c4 values=', class="TableSubHead"'}>
<td>{$lng.lbl_phone}</td>
<td><input type="text" name="customer_info[b_phone]" size="32" maxlength="32" value="{$cart_customer.b_phone|escape}" /></td>
<td>{$customer.b_phone}</td> {* CFL Systems - fixed XC bug *}
</tr>
{/if}
{if $address_fields.fax.avail eq 'Y'}
<tr{cycle name=c4 values=', class="TableSubHead"'}>
<td>{$lng.lbl_fax}</td>
<td><input type="text" name="customer_info[b_fax]" size="32" maxlength="32" value="{$cart_customer.b_fax|escape}" /></td>
<td>{$customer.b_fax}</td> {* CFL Systems - fixed XC bug *}
</tr>
{/if}

then find

{if $address_fields.lastname.avail eq 'Y'}
<tr{cycle name=c3 values=', class="TableSubHead"'}>
<td>{$lng.lbl_last_name}</td>
<td><input type="text" name="customer_info[s_lastname]" size="32" maxlength="128" value="{$cart_customer.s_lastname|escape}" /></td>
<td>{$customer.s_lastname}</td>
</tr>
{/if}

and after add

{* added by CFL Systems for company name *}
{if $address_fields.company.avail eq 'Y'}
<tr{cycle name=c2 values=', class="TableSubHead"'}>
<td>{$lng.lbl_company}</td>
<td><input type="text" name="customer_info[s_company]" size="32" maxlength="128" value="{$cart_customer.s_company|escape}" /></td>
<td>{$customer.s_company}</td>
</tr>
{/if}
{* added by CFL Systems for company name *}

then find

{if $address_fields.country.avail eq 'Y'}
<tr{cycle name=c3 values=', class="TableSubHead"'}>
<td>{$lng.lbl_country}</td>
<td>
<select name="customer_info[s_country]" id="customer_info_s_country" onchange="javascript: check_zip_code_field(this.form['customer_info[s_country]'], this.form['customer_info[s_zipcode]']);">
{section name=country_idx loop=$countries}
<option value="{$countries[country_idx].country_code|escape}"{if $cart_customer.s_country eq $countries[country_idx].country_code or ($countries[country_idx].country_code eq $config.General.default_country and $cart_customer.b_country eq "")} selected="selected"{/if}>{$countries[country_idx].country}</option>
{/section}
</select>
</td>
<td>{$customer.s_countryname}</td>
</tr>
{/if}

and change to

{if $address_fields.country.avail eq 'Y'}
<tr{cycle name=c3 values=', class="TableSubHead"'}>
<td>{$lng.lbl_country}</td>
<td>
<select name="customer_info[s_country]" id="customer_info_s_country" onchange="javascript: check_zip_code_field(this.form['customer_info[s_country]'], this.form['customer_info[s_zipcode]']);">
{section name=country_idx loop=$countries}
<option value="{$countries[country_idx].country_code|escape}"{if $cart_customer.s_country eq $countries[country_idx].country_code or ($countries[country_idx].country_code eq $config.General.default_country and $cart_customer.s_country eq "")} selected="selected"{/if}>{$countries[country_idx].country}</option> {* CFL Systems - fixed XC bug *}
{/section}
</select>
</td>
<td>{$customer.s_countryname}</td>
</tr>
{/if}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote