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

adding user-input fields

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-16-2002, 04:08 AM
  seaCOAST's Avatar 
seaCOAST seaCOAST is offline
 

X-Adept
  
Join Date: Oct 2002
Location: New Hampshire
Posts: 569
 

Default adding user-input fields

When a user chooses a product, the product options are shown. I would like to add 3 additional fields which the customer can input information which will be sent with their order.
ie- a Comment field for them to input any special instructions that should be sent with their order.

Is this possible without any major customization?
__________________
Xcart V4.5.5 Gold
seaCOAST
"Live FREE or DIE!"
Reply With Quote
  #2  
Old 11-16-2002, 06:23 PM
 
syddos syddos is offline
 

eXpert
  
Join Date: Sep 2002
Location: London, England, UK
Posts: 259
 

Default

Hi seaCOAST,

can't sleep, it's 2:45AM in London, just noticed your post. I'm certain this can be done, but it will require mods on at least 2 template files and 1 or 3 php files (/mail/order_notification.tpl, /customer/main/checkout.tpl, /customer/cart.php etc)

If I was to try this, I would add the 2 to 4 options to the checkout template (stage 2 or 3) as <input> text or textarea form elements, or use smarty variables to store the info as in (contact us.tpl) The 2 or 3 or however many options could be assigned as an options array in php, with error checking to only pass on variables that contained data, to the mail/order_notification.tpl. I can see another way to shortcut some of this by assiging the php created variables as GLOBAL, meaning the variable would reside in memory.

I hope the php/smarty experts, will look at what I posted here, and tell if I'm on the right track, or completely off the rails, as I'm still trying to learn smarty and php, and linux, and SQL and how to go to bed and sleep.

Well it's time for me to leave the programming, and try the sleeping bit.

Regards,
__________________
Syddos

Nothing is impossible, We just don't know how to do it ........Yet!

Xcart 4.1.X PRO (Testing Platform: winXP Pro)
Perl 5.8.7 (win32)
WINAMP 1.6.3 (win32 server package. Includes the following)
- phpMyAdmin v2.8.03
- MySql 5.0.21
- Apache 2.0.55 (win32)
- php 5.1.4
- SQLitemanager 1.2.0
Reply With Quote
  #3  
Old 11-17-2002, 02:47 AM
  shan's Avatar 
shan shan is offline
 

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

Default

Hi,

You could always add a few product options without anything in the options list part. That would create an empty text field that the customer can fill in.

Would be better if we could make the text field a text area but not managed that yet.
__________________
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 11-17-2002, 07:55 AM
  seaCOAST's Avatar 
seaCOAST seaCOAST is offline
 

X-Adept
  
Join Date: Oct 2002
Location: New Hampshire
Posts: 569
 

Default

Thank you both.

Shan, I wasn't aware that this was possible. Works PERFECTLY!
__________________
Xcart V4.5.5 Gold
seaCOAST
"Live FREE or DIE!"
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 09:52 AM.

   

 
X-Cart forums © 2001-2020