Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

changing the customer registration info not working

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 10-10-2004, 12:47 PM
 
sherwood sherwood is offline
 

Member
  
Join Date: Apr 2004
Posts: 16
 

Default changing the customer registration info not working

Hi,

I wanted to create a custom registration page for customers but upon clicking submit the "form has errors" message appears when running a test. I am using version 3.5.7 . our website is at www.sherwoodsforest.com if anyone can take a look and see what you think I would sincerely appreciate the help!

Here is the code I have for register_billing_address...
{* $Id: register_billing_address.tpl,v 1.1.2.1 2004/04/09 07:07:28 svowl Exp $ *}
<tr valign=middle>
<td height=20 colspan=3>{$lng.lbl_billing_address}<center><font color=red>Billing Information</td>
</tr>

{if $action eq "cart"}
<INPUT type=hidden name="action" value="cart">
<INPUT type=hidden name="paymentid" value="{$paymentid}">{/if}

<tr valign=middle>
<td align=right>{$lng.lbl_first_name}</td>
<td><font class=Star>*</font></td>
<td nowrap>
<input type=text name=b_firstname size=32 maxlength=32 value="{$userinfo.b_firstname}">
{if $reg_error ne "" and $userinfo.b_firstname eq ""}<font class=Star>&lt;&lt;</font>{/if}
</td>
</tr>


<tr valign=middle>
<td align=right>{$lng.lbl_last_name}Last Name</td>
<td><font class=Star>*</font></td>
<td nowrap>
<input type=text name=b_lastname size=32 maxlength=32 value="{$userinfo.b_lastname}">
{if $reg_error ne "" and $userinfo.b_lastname eq ""}<font class=Star>&lt;&lt;</font>{/if}
</td>
</tr>


<tr valign=middle>
<td align=right>{$lng.lbl_address}Address</td>
<td><font class=Star>*</font></td>
<td nowrap>
<input type=text name=b_address size=32 maxlength=64 value="{$userinfo.b_address}">
{if $reg_error ne "" and $userinfo.b_address eq ""}<font class=Star>&lt;&lt;</font>{/if}
</td>
</tr>

<tr valign=middle>
<td align=right>{$lng.lbl_city}</td>
<td><font class=Star>*</font></td>
<td nowrap>
<input type=text name=b_city size=32 maxlength=64 value="{$userinfo.b_city}">
{if $reg_error ne "" and $userinfo.b_city eq ""}<font class=Star>&lt;&lt;</font>{/if}
</td>
</tr>
<tr valign=middle>
<td align=right>{$lng.lbl_state}State</td>
<td>{if $states ne ""}<font class=Star>*</font>{/if}</td>
<td nowrap>
{include file="main/states.tpl" states=$states name="b_state" default=$userinfo.b_state default_country=$userinfo.b_country}
</td>
</tr>

<tr valign=middle>
<td align=right>{$lng.lbl_country}Country</td>
<td><font class=Star>*</font></td>
<td nowrap>
<select name=b_country onChange="check_zip_code()">
{section name=country_idx loop=$countries}
<option value={$countries[country_idx].country_code} {if $userinfo.b_country eq $countries[country_idx].country_code}selected{elseif $countries[country_idx].country_code eq $config.General.default_country and $userinfo.b_country eq ""}selected{/if}>{$countries[country_idx].country}</option>
{/section}
</select>
</td>
</tr>

<tr valign=middle>
<td align=right>{$lng.lbl_zip_code}Zip Code</td>
<td><font class=Star>*</font></td>
<td nowrap>
<input type=text name=b_zipcode size=32 maxlength=32 value="{$userinfo.b_zipcode}" onChange="check_zip_code()" >
{if $reg_error ne "" and $userinfo.b_zipcode eq ""}<font class=Star>&lt;&lt;</font>{/if}
</td>
</tr>

Here is the code for register_contact_info.tpl...
{* $Id: register_contact_info.tpl,v 1.1.2.1 2004/03/26 09:47:34 svowl Exp $ *}
<tr valign=middle>
<td height=20 colspan=3><font color=red><center>Contact Information</center</td>
</tr>

<tr valign=middle>
<td align=right>Phone</td>
<td><font class=Star>*</font></td>
<td nowrap>
<input type=text name=phone size=32 maxlength=32 value="{$userinfo.phone}">
{if $reg_error ne "" and $userinfo.phone eq ""}<font class=Star>&lt;&lt;</font>{/if}
</td>
</tr>

<tr valign=middle>
<td align=right>E-Mail</td>
<td><font class=Star>*</font></td>
<td nowrap>
<input type=text name=email size=32 maxlength=128 value="{$userinfo.email}">
{if $emailerror ne "" or ($reg_error ne "" and $userinfo.email eq "")}<font class=Star>&lt;&lt;</font>{/if}
</td>
</tr>

<tr valign=middle>
<td align=right>Fax</td>
<td></td>
<td nowrap>
<input type=text name=fax size=32 maxlength=128 value="{$userinfo.fax}"></td>
</tr>

<tr valign=middle>
<td align=right>Web site</td>
<td></td>
<td nowrap>
<input type=text name=url size=32 maxlength=128 value="{$userinfo.url}"></td>
</tr>
{include file="customer/main/checkout_notes.tpl"}

Here is the code for register_personal_info.tpl...
{* $Id: register_personal_info.tpl,v 1.1.2.1 2003/11/24 08:51:59 svowl Exp $ *}
<tr valign=right>
<td height=20 colspan=3><font color=red><center>{$lng.lbl_personal_information}Business Information</font><font color=black>
(For Business Owners Applying For Wholesale Privilages only)</font></font></center>
</td>
</tr>



{*<tr valign=middle>
<td align=right>{$lng.lbl_title}</td>
<td><font class=Star>*</font></td>
<td nowrap>
<select name=title>
{section name=title loop=$name_titles}
<option {if $userinfo.title eq $name_titles[title]}selected{/if}>{$name_titles[title]}</option>
{/section}
</select>
</td>
</tr>*}

{*<tr valign=middle>
<td align=right>{$lng.lbl_first_name}</td>
<td><font class=Star>*</font></td>
<td nowrap>
<input type=text name=firstname size=32 maxlength=32 value="{$userinfo.firstname}">
{if $reg_error ne "" and $userinfo.firstname eq ""}<font class=Star>&lt;&lt;</font>{/if}
</td>
</tr>*}

<tr valign=middle>
<td align=right>{$lng.lbl_owners_name}Owner's Name</td>
<td></td>
<td nowrap>
<input type=text name=ownersname size=32 maxlength=32 value="{$userinfo.ownersname}">
{if $reg_error ne "" and $userinfo.ownersname eq ""}<font class=Star>&lt;&lt;</font>{/if}
</td>
</tr>

<tr valign=middle>
<td align=right>{$lng.lbl_company}Company Name</td>
<td></td>
<td nowrap>
<input type=text name=company size=32 maxlength=32 value="{$userinfo.company}">
</td>
</tr>

<tr valign=middle>
<td align=right>Business License/Tax ID#</td>
<td></td>
<td nowrap>
<input type=text name=license size=32 maxlength=32 value="{$userinfo.license}">
</td>
</tr>

<tr valign=middle>
<td align=right>Type of Business</td>
<td></td>
<td nowrap>
<input type=text name=Type of Business size=32 maxlength=32 value="{$userinfo.typeofbusiness}">
</td>
</tr>


{* <TR valign=middle> *}
{* <TD align=right>{$lng.lbl_ssn}</TD> *}
{* <TD></TD> *}
{* <TD nowrap> *}
{* <INPUT type=text name=ssn size=32 maxlength=32 value="{$userinfo.ssn}"> *}
{* </TD> *}
{* </TR> *}

{if $usertype eq "A" or $usertype eq "P"}
<tr valign=middle>
<td align=right>Referred by:</td>
<td></td>
<td nowrap>
{$userinfo.referer}
</td>
</tr>
{/if}

and here is the code for register_shipping_address.tpl...
{* $Id: register_shipping_address.tpl,v 1.1.2.1 2004/04/09 07:07:28 svowl Exp $ *}
<tr valign=middle>
<td height=20 colspan=3><font color=red><center>Shipping Information
<font color=black>(Leave Blank if shipping & Billing name and address are the same)</font></font>{$lng.lbl_shipping_address_registration}
</td>
</tr>

{if $action eq "cart"}
<INPUT type=hidden name="action" value="cart">
<INPUT type=hidden name="paymentid" value="{$paymentid}">{/if}


{*<tr valign=middle>
<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>*}

<tr valign=middle>
<td align=right>{$lng.lbl_first_name}</td>
<td></td>
<td nowrap>
<input type=text name=s_firstname size=32 maxlength=32 value="{$userinfo.s_firstname}">
</td>
</tr>

<tr valign=middle>
<td align=right>{$lng.lbl_last_name}Last Name</td>
<td></td>
<td nowrap>
<input type=text name=s_lastname size=32 maxlength=32 value="{$userinfo.s_lastname}">
</td>
</tr>


<tr valign=middle>
<td align=right>{$lng.lbl_address}Address</td>
<td></td>
<td nowrap>
<input type=text name=s_address size=32 maxlength=64 value="{$userinfo.s_address}">
</td>
</tr>

<tr valign=middle>
<td align=right>{$lng.lbl_city}</td>
<td></td>
<td nowrap>
<input type=text name=s_city size=32 maxlength=64 value="{$userinfo.s_city}">
</td>
</tr>
<tr valign=middle>
<td align=right>{$lng.lbl_state}State</td>
<td></td>
<td nowrap>
{include file="main/states.tpl" states=$states name="s_state" default=$userinfo.s_state default_country=$userinfo.s_country}
</td>
</tr>

<tr valign=middle>
<td align=right>{$lng.lbl_country}Country</td>
<td></td>
<td nowrap>
<select name=s_country size=1 onChange="check_zip_code()">
{section name=country_idx loop=$countries}
<option value={$countries[country_idx].country_code} {if $userinfo.s_country eq $countries[country_idx].country_code}selected{elseif $countries[country_idx].country_code eq $config.General.default_country and $userinfo.b_country eq ""}selected{/if}>{$countries[country_idx].country}</option>
{/section}
</select>
</td>
</tr>

<tr valign=middle>
<td align=right>{$lng.lbl_zip_code}Zip Code</td>
<td></td>
<td nowrap>
<input type=text name=s_zipcode size=32 maxlength=32 value="{$userinfo.s_zipcode}" onChange="check_zip_code()" >
</td>
</tr>
Reply With Quote
  #2  
Old 10-10-2004, 06:31 PM
 
instinctual instinctual is offline
 

eXpert
  
Join Date: Nov 2003
Posts: 247
 

Default More Edits Needed...

Well, first off, you need to not only modify this .tpl you have posted, but also you need to modify /include/register.php in a few different spots.

If you do an "edit/find" in notepad when viewing the register.php file for "update" and then again for "insert" you should see all the spots where they are making a database call and updating the data in the DB.

These spots need to have your extra field added into them as well...

Lemme know if you get in a bind!

Instinctual
Colorado
X-Cart Versions 3.5.x - 4.0.4
Reply With Quote
  #3  
Old 10-10-2004, 07:49 PM
 
sherwood sherwood is offline
 

Member
  
Join Date: Apr 2004
Posts: 16
 

Default

I think that is over my head. I guess I will contact tech support and see if they can get it working for me.
Reply With Quote
  #4  
Old 10-11-2004, 05:54 AM
 
instinctual instinctual is offline
 

eXpert
  
Join Date: Nov 2003
Posts: 247
 

Default I can do...

I can do it for you...would take a couple of hours to make sure it was all straightened out - - - do you have a budget to work with? Would probabaly be minimal $$$.

Lemme know!
Reply With Quote
  #5  
Old 10-11-2004, 06:52 AM
 
sherwood sherwood is offline
 

Member
  
Join Date: Apr 2004
Posts: 16
 

Default

let me know how much it would cost to have you get it working and what you would need to do so.

Thanks!
Reply With Quote
  #6  
Old 10-11-2004, 07:05 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

you probably broke something in the code that ou changed. maybe post what you did and what your trying to do. not just a big lump of code
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #7  
Old 10-11-2004, 07:15 AM
 
sherwood sherwood is offline
 

Member
  
Join Date: Apr 2004
Posts: 16
 

Default

Hi,

What I was trying to do was to change the sections of the customer registration section. There is a section for personal information, I was trying to change that to a business section (company name) (purchasers name) (business license #) (type of business) and then I was trying to add a few lines in the other sections as well. You can see it at www.sherwoodsforest.com if you click on the new customer registration the form will come up and you can see what I was trying to put in there. I just went live with the site on Friday and my customers cant order now until I get this fixed. I am not sure exactly what I changed. I tried to use the fields that were already there but just change the names of the fields. I am afraid I have made a mess of it now
Reply With Quote
  #8  
Old 10-11-2004, 07:23 AM
  shan's Avatar 
shan shan is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Birmingham, UK
Posts: 6,163
 

Default

you can restore the file you changed and just change the lables in the languages area then go from there
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 11:50 AM.

   

 
X-Cart forums © 2001-2020