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

Select Box - User Profile

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 01-18-2012, 08:25 AM
 
fwm fwm is offline
 

Advanced Member
  
Join Date: Apr 2011
Posts: 78
 

Default Select Box - User Profile

Hi All,

I see that in the user profiles section of the admin I can add some additional fields. I have the option to add a select box as one if these. I want to add one to allow a user to select a state, however, for example I want the state to appear as "Alaska" but the value stored in the DB to be "AK".

I wonder can this be done?

Thanks,
FWM.
__________________
X-Cart 4.1.9
X-Cart 4.4.1
X-Cart Platinum 4.6.1
Reply With Quote
  #2  
Old 01-18-2012, 01:21 PM
  cherie's Avatar 
cherie cherie is offline
 

X-Wizard
  
Join Date: May 2003
Location: USA
Posts: 1,534
 

Default Re: Select Box - User Profile

You'd have to customize the template where that appears and use code for generating the states drop-down in place of that field, something like this:

PHP Code:
{include file="main/states.tpl" states=$states name="address_book[`$id`][state]" default=$address.state|default:$config.General.default_state default_country=$address.country|default:$config.General.default_country country_name="country" id="state`$id`"

The template might be main/register_additional_info.tpl
__________________
redlimeweb.com
custom mods and design integration
4.7 linux
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 03:47 PM.

   

 
X-Cart forums © 2001-2020