View Single Post
  #1  
Old 07-08-2005, 06:11 PM
 
Joe Schwartz Joe Schwartz is offline
 

Newbie
  
Join Date: Mar 2005
Location: New York City
Posts: 7
 

Default Register profile shipping name

I wanted to have the first name and last name for shipping address displayed when a customer registers with the site through create profile (as opposed to anonymous checkout) so that they could ship their purchase to another person should they be sending a gift.

I edited the skin1/main/register_shipping_address.tpl to comment out the {if} loop that suppesses these fields:

Code:
{*{if $action eq "cart"}*} {if $default_fields.title.avail eq 'Y'} <TR> <TD align="right">{$lng.lbl_title}</TD> <TD></TD> <TD nowrap> <SELECT name="s_title"> {section name=title loop=$name_titles} <OPTION {if $userinfo.s_title eq $name_titles[title]}selected{/if}>{$name_titles[title]}</OPTION> {/section} </SELECT> </TD> </TR> {/if} {if $default_fields.firstname.avail eq 'Y'} <TR> <TD align="right">{$lng.lbl_first_name}</TD> <TD>{if $default_fields.firstname.required eq 'Y' && $is_s_fields}<FONT class="Star">*</FONT>{else}{/if}</TD> <TD nowrap> <INPUT type="text" name="s_firstname" size="32" maxlength="32" value="{$userinfo.s_firstname}"> {if $reg_error ne "" and $userinfo.s_firstname eq "" && $default_fields.firstname.required eq 'Y' && $is_s_fields}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> {/if} {if $default_fields.lastname.avail eq 'Y'} <TR> <TD align="right">{$lng.lbl_last_name}</TD> <TD>{if $default_fields.lastname.required eq 'Y' && $is_s_fields}<FONT class="Star">*</FONT>{else}{/if}</TD> <TD nowrap> <INPUT type="text" name="s_lastname" size="32" maxlength="32" value="{$userinfo.s_lastname}"> {if $reg_error ne "" and $userinfo.s_lastname eq "" && $default_fields.lastname.required eq 'Y' && $is_s_fields}<FONT class="Star">&lt;&lt;</FONT>{/if} </TD> </TR> {/if} {*{/if}*}

This displayed the first name and last name shipping address fields in the create new profile screen, however the fields do not retain the information entered into them. Instead upon submitting the form, x-cart populates those fields with the first and last names from the personal information section on the form (from skin1/main/register_personal_info.tpl).

How do I get x-cart to recognize the user input in the first name and last name shipping address fields in the create profile screen and (presumably) submit/write them to the SQL database so that when they make a purchase while logged into this profile the billing and shipping addresses will have different names (I know this works from anonymous checkout, but I'd like it to work from here as well).

Any help would be greatly appreciated.
__________________
Version 4.0.14
Unix server
www.happyhappyhappy.com (live)
Reply With Quote