geoffb Posted December 6, 2013 Share Posted December 6, 2013 Hi, I would really like to edit the content.checkout.confirm.php file I would like to make the Title field a set of drop down options, you've seen them everywhere. Mr, Mrs, Miss ect rather than the user typing in their title. At the moment its an input field with a value of {$USER.title}. Any help much appreciated. Thanks G Quote Link to comment Share on other sites More sharing options...
bsmither Posted December 6, 2013 Share Posted December 6, 2013 In the template file content.checkout.confirm.php, find:<div><label for="user_title">{$LANG.user.title}</label><span><input type="text" name="user[title]" id="user_title" class="textbox capitalize" value="{$USER.title}" /></span></div> Change to:<div><label for="user_title">{$LANG.user.title}</label> <span><select name="user[title]" id="user_title" class="textbox"> <option value="Mr." {if $USER.title == "Mr."}selected{/if}>$USER.title</option> -- Repeat for each additional option -- </select></span> </div> This is a hard-coded solution for the skin. There is also the file content.addressbook.php file. Quote Link to comment Share on other sites More sharing options...
geoffb Posted December 6, 2013 Author Share Posted December 6, 2013 Hi bsmither, again, thanks very much works like a treat, just wondering if I have the following: <div><label for="user_title">{$LANG.user.title}</label> <span><select name="user[title]" id="user_title" class="textbox"> <option value="Mr." {if $USER.title == "Mr."}selected{/if}>Mr</option> <option value="Mrs." {if $USER.title == "Mrs."}selected{/if}>Mrs</option> <option value="Miss." {if $USER.title == "Miss."}selected{/if}>Miss</option> <option value="Ms." {if $USER.title == "Ms."}selected{/if}>Ms</option> <option value="Dr." {if $USER.title == "Dr."}selected{/if}>Dr</option> <option value="Rev." {if $USER.title == "Rev."}selected{/if}>Rev</option> <option value="Other." {if $USER.title == "Other."}selected{/if}>Other</option> </select></span> </div> I have also added a JS function by where if the user chooses 'Other' then a new field opens (basically the old one as below and the user can add their own title <div class="other" style="display:none;"><label for="user_title">Other</label><span><input type="text" name="user[title]" id="user_title" class="textbox capitalize" value="{$USER.title}" /></span></div> although I'm not too sure if this will be saved properly into the system as I have just edited my test customer and added Sir into the Other field and the account in admin still says Mr Quote Link to comment Share on other sites More sharing options...
geoffb Posted December 6, 2013 Author Share Posted December 6, 2013 No worries actually I have just created a new order and registered using Sir in Other and its gone straight into the field in both the users account and admin - Great! have a fab weekend you guys/gals G Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.