| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Capitalise First Letters in Customer Info | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||
|
|||||||
Here is the code to "proper case" multiple word fields like the address line in your existing database.
Code:
Create a php file with this code. Repalce %FIELD_HERE% and %TABLE_HERE% strings with name of field you want to modify and name of table where this field is stored. For example you can replace : $field = "%FIELD_HERE%"; $table = "%TABLE_HERE%"; with $field = "b_address"; $table = "xcart_customers"; Then just upload the file and run it. You will get an on-screen look at all the field changes. It takes a minute or to to run so be patient.
__________________
X-Cart Gold 4.1.8 |
|||||||
#12
|
|||||||||
|
|||||||||
not working for me
i installed this mod
it is working in the contact us but not in the register new customer etc i dont have ez checout like mentioned before i have checked and checked but cant find out where i am going wrong any help will be appreciated
__________________
Regards Maxking SERVER: Microsoft-IIS/5.0 MYSQL Server: 4.0.18-NT PERL: 5.006001 PHP: 4.3.6 X-CART pro: 4.3 X-AOM: 4..3 X-RMA: 4..3X-FancyCategories 4.3 Skin: Own Design Marketing Manager Professional 3.0 Bundle |
|||||||||
#13
|
|||||||||
|
|||||||||
I'm probably being a bot thick here, but could you not acheive a similar effect using text-transform: capitalize in the css?
__________________
X-Cart version 5 (Previously 3.5-4) Previous Versions included BCSE Reward Points Mod Altered Cart On Sale Mod Wordpress Plugin Please don't PM me for support. I help where I can on the forum and your question will more likely be answered there. Shout me a Coffee! |
|||||||||
#14
|
|||||||||
|
|||||||||
I don't know what to say. This little mod rocks! Very cool and I have no idea how I missed seeing this 6 months ago! Very cool...
__________________
Carl Tice X-Cart 4.6.6 X-Payments 3.0 ReBOOT 3.4.1 PHP 5.6.30 MySQL 5.6.35 Linux 2.6.32-042stab120.18 ionCube PHP Loader v4.7.3 Perl 5.10.1 |
|||||||||
#15
|
|||||||
|
|||||||
Re: Capitalise First Letters in Customer Info
Use smarty variable modifiers:
Use the following for Firstname / Lastname etc: |capitalize:true and |upper for Post Code Examples: <INPUT type="text" name="s_firstname" size="32" maxlength="32" value="{$userinfo.s_firstname|capitalize:true}"> <INPUT type="text" id="s_zipcode" name="s_zipcode" size="32" maxlength="32" value="{$userinfo.s_zipcode|upper}" onChange="check_zip_code()"> But haven't figure out where the the County |capitalize:true goes? Any ideas? Andy
__________________
X-Cart Gold v4.1.11 |
|||||||
#16
|
|||||||||
|
|||||||||
Re: Capitalise First Letters in Customer Info
i have tried thsi mod
it just dosnt seem to work on 4.1.7 i have had it working on version 4.0.17 tried and trie dno joy has anybody got a working version for 4.1.7? would really appreciate it thanks in advance
__________________
Regards Maxking SERVER: Microsoft-IIS/5.0 MYSQL Server: 4.0.18-NT PERL: 5.006001 PHP: 4.3.6 X-CART pro: 4.3 X-AOM: 4..3 X-RMA: 4..3X-FancyCategories 4.3 Skin: Own Design Marketing Manager Professional 3.0 Bundle |
|||||||||
#17
|
|||||||
|
|||||||
Re: Capitalise First Letters in Customer Info
why the loop through all the letters?
use split and then do a o[i].charAt(0).toUpperCase()+o[i].substr(1).toLowerCase() |
|||||||
#18
|
|||||||
|
|||||||
Re: Capitalise First Letters in Customer Info
Phil
You do the most amazing mods. This is exactly what I am looking for, but to modify litecommerce not xcart. Can you give me an idea of the complications I may run into. Thanks Kit |
|||||||
#19
|
|||||||||
|
|||||||||
Re: Capitalise First Letters in Customer Info
heh, neat mod. I got it working in conrtact.php but not in the rest.
I have a copybilling mod that also uses onChange function in register_personal_info.tpl This is my code: Code:
Anyone know how to properly combine the two actions for onChange?
__________________
Cordially, Just me X-Cart Gold Version 4.2.3 Multilingual shop: Spanish, French and US English |
|||||||||
#20
|
|||||||||
|
|||||||||
Re: Capitalise First Letters in Customer Info
Anybody get this to work in 4.1.x? I used the same code we used in 4.0.x but it will not work.
__________________
Carl Tice X-Cart 4.6.6 X-Payments 3.0 ReBOOT 3.4.1 PHP 5.6.30 MySQL 5.6.35 Linux 2.6.32-042stab120.18 ionCube PHP Loader v4.7.3 Perl 5.10.1 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|