X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Address Fields (https://forum.x-cart.com/showthread.php?t=12439)

Lara Croft 02-26-2005 12:50 AM

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.

:) :)

pauldodman 03-03-2005 01:41 AM

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

shan 03-03-2005 05:33 AM

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

Lara Croft 03-03-2005 06:44 AM

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

:)

Lara Croft 03-03-2005 11:55 AM

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.
:D :D :D


All times are GMT -8. The time now is 01:47 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.