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

Address Fields

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-26-2005, 12:50 AM
  Lara Croft's Avatar 
Lara Croft Lara Croft is offline
 

Member
  
Join Date: Feb 2005
Posts: 16
 

Default Address Fields

hello everyone - how can i add an extra address field in the customer details forms.
i have found out how to add additional fields but i want to add an "Address (line 3)" field between the Address (line 2) and the City Fields of the forms. i have tried editing the template of help/contact us.tpl by copying the address field scripts and changing the figures from 2 to 3 and positioning it after the address 2 script block but i just get an error message when i refresh the page.

if this makes sense to anyone, i would really appreciate some help.

__________________
Patience Of A Saint - Memory Of A Goldfish

XCART Gold version 4.0.19
Reply With Quote
  #2  
Old 03-03-2005, 01:41 AM
  pauldodman's Avatar 
pauldodman pauldodman is offline
 

X-Guru
  
Join Date: Jul 2003
Location: Spain / UK
Posts: 3,052
 

Default

There are probably two ways to approach this normally. One is to edit templates like you are doing, but it is probably more complicated than that and needs the relevant php editing and fields adding to the database.

The other way would normally be to use the User Profile Options under General Settings. But this for some reason, I think only allows you to add an extra field to the bottom of the section, not in the middle or wherever. Is that right?

If so you need a workaround, or to give it its technical term, we need to cheat. So in the absence of any other replies here, this is how I would do it...

Disable the fields below where you want to add the new field.
Then add your additional field.
Then add as additional fields, all the ones you disabled.
Don't forget to make them active, but not the ones you previously disabled.

You then have all the fields you want, in the order you want.

The next problem is that despite them being disabled, they still appear in the emails sent.

So edit the templates, mail/profile_data.tpl (you probably need to do the one in the sub folder "html" as well).
Remove the lines that refer to the fields you disabled. Make sure you remove complete rows, beginning from a <TR> and ending with a </TR>.

Hope this helps, I am sure it will work, just as long as I haven't missed anywhere where these fields might appear, despite them being disabled.

Paul Dodman
e-business consultant
Lumino Internet
luminointernet.co.uk
__________________
Paul Dodman
e-business & m-commerce consultant
w: www.luminointernet.com
e: xcart@luminointernet.com

Professional X-Cart help, advice, support and services, specialists in Mobile X-Cart.
Reply With Quote
  #3  
Old 03-03-2005, 05:33 AM
  shan's Avatar 
shan shan is offline
 

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

Default

or, add the extra fields you need via admin as normal and then go and edit the template that controls that section of the register form and move the code that adds the extra fields to the list
__________________
Looking for a reliable X-cart host ?
You wont go wrong with either of these.

EWD Hosting
Hands On Hosting
Reply With Quote
  #4  
Old 03-03-2005, 06:44 AM
  Lara Croft's Avatar 
Lara Croft Lara Croft is offline
 

Member
  
Join Date: Feb 2005
Posts: 16
 

Default COOL !!

thankyou both very much - can you point me to the template that controls that section of the register form to move the code that adds the extra fields to the list

__________________
Patience Of A Saint - Memory Of A Goldfish

XCART Gold version 4.0.19
Reply With Quote
  #5  
Old 03-03-2005, 11:55 AM
  Lara Croft's Avatar 
Lara Croft Lara Croft is offline
 

Member
  
Join Date: Feb 2005
Posts: 16
 

Default solved !!!

I did that - added an extra field, then went into the tpl page and just cut the code for it and pasted it after the code block for Address (Line 2) and it worked just great so thankyou all.
__________________
Patience Of A Saint - Memory Of A Goldfish

XCART Gold version 4.0.19
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09:52 AM.

   

 
X-Cart forums © 2001-2020