limit the number of characters allowed on address line 1
How can I limit the number of characters allowed on address line 1 on the checkout page? I had a customer that put the street address and apartment number all in address line 1 and when I printed the label it cut off the last 2 digits of the apartment. So fedex delivered it somewhere but not to the right place.
This is for x-cart version 4.7.11 and using one page Ajax checkout. Thanks. |
Re: limit the number of characters allowed on address line 1
/skin/common_files/modules/One_Page_Checkout/profile/address_fields.tpl
Around line 72... Replace... Code:
<input type="text" id="{$id_prefix}{$fname}" name="{$name_prefix}[{$fname}]" size="32" maxlength="255" value="{$address.$fname|default:$default_value|escape}" {$autofocus} /> With... Code:
<input type="text" id="{$id_prefix}{$fname}" name="{$name_prefix}[{$fname}]" size="32" maxlength="{if $fname eq 'address'}32{else}255{/if}" value="{$address.$fname|default:$default_value|escape}" {$autofocus} /> Or you could just change 255 to 32 to limit all fields maximum lengths to 32 characters. |
Re: limit the number of characters allowed on address line 1
Beautiful, thanks Phil. Exactly what I needed.
|
All times are GMT -8. The time now is 06:52 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.