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

template blues

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-11-2011, 10:38 AM
 
bultaco bultaco is offline
 

Member
  
Join Date: May 2009
Posts: 19
 

Default template blues

Hi there,

I've been hours now with firebug, vi editor and grep'n all over the place and I just can't work out the following....perhaps someone would be kind enough to shed some light on the issue...

In the x-cart admin section under Users -> User Profiles -> Additional Fields -> add new field

You can add "type" as text/check box /select box

I would like to add "text" but 2 lines and not just one line.

At the moment only one line is possible.

Any ideas would be appreciated !

-----------------------------
x-Cart version 4.4.0
__________________
4.2
Reply With Quote
  #2  
Old 12-11-2011, 10:53 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: template blues

An additional field would need a separate entry in the db. Unless you just want to change the input type to <textarea>.

Why not have two fields? Name 1 and Name 2?

-Mike
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following user thanks totaltec for this useful post:
bultaco (12-11-2011)
  #3  
Old 12-11-2011, 10:59 AM
 
bultaco bultaco is offline
 

Member
  
Join Date: May 2009
Posts: 19
 

Default Re: template blues

Hi Mike,

Thanks....would you have any idea how to change it to a textarea ?

...at the moment the box is 181x14px and I would like to change it to an textarea say 181x50 or something.

Ken
__________________
4.2
Reply With Quote
  #4  
Old 12-11-2011, 12:58 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: template blues

I haven't tested this, but it looks like you need to change:
/common_files/customer/main/register_additional_info.tpl
Code:
{if $v.type eq 'T'} <input type="text" name="additional_values[{$v.fieldid}]" id="additional_values_{$v.fieldid}" size="32" value="{$v.value|escape}" />
to something like:
Code:
{if $v.type eq 'T'} <textarea rows="2" cols="20" name="additional_values[{$v.fieldid}]" id="additional_values_{$v.fieldid}"> {$v.value|escape} </textarea>

I have no idea if this works, or if it has any ill effects otherwise.

Hope that helps,

-Mike
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following user thanks totaltec for this useful post:
bultaco (12-12-2011)
  #5  
Old 12-12-2011, 01:46 PM
 
bultaco bultaco is offline
 

Member
  
Join Date: May 2009
Posts: 19
 

Default Re: template blues

Hey Mike

It might have been a rough guess but it was spot on ! thanks

tried it out and it worked perfect

Ken
__________________
4.2
Reply With Quote
  #6  
Old 12-12-2011, 05:10 PM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: template blues

This will make any additonal field of type text for user profile textarea. Also not that this data in the database allows to no more then 255 characters (I think) and it may not save new lines
__________________
Steve Stoyanov
CFLSystems.com
Web Development
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 01:38 PM.

   

 
X-Cart forums © 2001-2020