Jump to content
Sign in to follow this  
perrow

Remove "Title" from address

Recommended Posts

Hi

I plan to use this software solely in Sweden for my current installation. It is now about 35+ years since we stopped using titles in addresses and rather than being ridiculed I'd like to remove the field.

How can I disable or hide this field?

Share this post


Link to post
Share on other sites

Welcome perrow! Glad to see you made it to the forums.

Essentially, you just need to remove (or hide) three form elements: Registration, Addressbook, and Checkout Confirm. If the data is not entered, it will not show.

Look in the skin's templates content.register.php, content.addressbook.php, and content.checkout.confirm.php for the following code (or very similar to it):

<input type="text" name="title" id="title" value="{$DATA.title}" placeholder="{$LANG.user.title}">

This form element will be inside other code. If the skin is Foundation, then the entire set of statements you are interested in will be very similar to:

   <div class="row">
      <div class="small-4 columns"><label for="title" class="show-for-medium-up">{$LANG.user.title}</label><input type="text" name="title" id="title" value="{$DATA.title}" placeholder="{$LANG.user.title}"></div>
   </div>

To "hide" this code, make the following edit each to the three templates:

{*   <div class="row">
      <div class="small-4 columns"><label for="title" class="show-for-medium-up">{$LANG.user.title}</label><input type="text" name="title" id="title" value="{$DATA.title}" placeholder="{$LANG.user.title}"></div>
   </div>  *}

All that was done is to have made the template rendering engine (Smarty) ignore these template "comments".

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the reply.

I've used Smarty templates before (like ten years ago, but still) so no problem. Any risk that updates will overwrite these changes?

Share this post


Link to post
Share on other sites

CubeCart has a "whole-cloth" update paradigm. Customizations made to files that match the incoming package will be overwritten.

Note that CubeCart ships with the Foundation skin. You can make a copy of, and/or rename Foundation to something else (a couple of edits to the config.xml and a new folder name to match), and the incoming, updated Foundation skin will not overwrite the renamed folder.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×