Jump to content

Remove/hide date of birth on registration/checkout


Ricky Blunda

Recommended Posts

Hello

 

Could anyone PLEASE help me with how to remove/hide the date of birth fields on the registration/checkout page? Ive been trying for two days now reading old forum posts and commenting out sections of code in various files. I need them removed from both Guest Checkout as well as new customer registration form.

 

Ive managed to comment the fields out so they're not visible in either Guest Checkout or the registration form, but then they (the fields) just end up on the main checkout page instead (below the two yellow "Guest" and "Register" buttons).

 

This is driving me quite mad. Help?

 

Link to comment
Share on other sites

I usally delete all this code in order-opc-new-account.tpl:

<div class="select form-group date-select">
                        <label>{l s='Date of Birth'}</label>
                        <div class="row">
                           <div class="col-xs-4">
                              <select id="days" name="days" class="form-control">
                                 <option value="">-</option>
                                 {foreach from=$days item=day}
                                    <option value="{$day|escape:'html':'UTF-8'}" {if isset($guestInformations) && isset($guestInformations.sl_day) && ($guestInformations.sl_day == $day)} selected="selected"{/if}>{$day|escape:'html':'UTF-8'}  </option>
                                 {/foreach}
                              </select>
                              {*
                              {l s='January'}
                              {l s='February'}
                              {l s='March'}
                              {l s='April'}
                              {l s='May'}
                              {l s='June'}
                              {l s='July'}
                              {l s='August'}
                              {l s='September'}
                              {l s='October'}
                              {l s='November'}
                              {l s='December'}
                              *}
                           </div>
                           <div class="col-xs-4">
                              <select id="months" name="months" class="form-control">
                                 <option value="">-</option>
                                 {foreach from=$months key=k item=month}
                                    <option value="{$k|escape:'html':'UTF-8'}" {if isset($guestInformations) && isset($guestInformations.sl_month) && ($guestInformations.sl_month == $k)} selected="selected"{/if}>{l s=$month} </option>
                                 {/foreach}
                              </select>
                           </div>
                           <div class="col-xs-4">
                              <select id="years" name="years" class="form-control">
                                 <option value="">-</option>
                                 {foreach from=$years item=year}
                                    <option value="{$year|escape:'html':'UTF-8'}" {if isset($guestInformations) && isset($guestInformations.sl_year) && ($guestInformations.sl_year == $year)} selected="selected"{/if}>{$year|escape:'html':'UTF-8'}  </option>
                                 {/foreach}
                              </select>
                           </div>
                        </div>
                     </div>

And in authentication.tpl:

<div class="form-group date-select">
						<label>{l s='Date of Birth'}</label>
						<div class="row">
							<div class="col-xs-4">
								<select id="days" name="days" class="form-control">
									<option value="">-</option>
									{foreach from=$days item=day}
										<option value="{$day}" {if ($sl_day == $day)} selected="selected"{/if}>{$day}  </option>
									{/foreach}
								</select>
								{*
									{l s='January'}
									{l s='February'}
									{l s='March'}
									{l s='April'}
									{l s='May'}
									{l s='June'}
									{l s='July'}
									{l s='August'}
									{l s='September'}
									{l s='October'}
									{l s='November'}
									{l s='December'}
								*}
							</div>
							<div class="col-xs-4">
								<select id="months" name="months" class="form-control">
									<option value="">-</option>
									{foreach from=$months key=k item=month}
										<option value="{$k}" {if ($sl_month == $k)} selected="selected"{/if}>{l s=$month} </option>
									{/foreach}
								</select>
							</div>
							<div class="col-xs-4">
								<select id="years" name="years" class="form-control">
									<option value="">-</option>
									{foreach from=$years item=year}
										<option value="{$year}" {if ($sl_year == $year)} selected="selected"{/if}>{$year}  </option>
									{/foreach}
								</select>
							</div>
						</div>
					</div>
Link to comment
Share on other sites

Hello and thanks for replying! Also, Happy New Year :)

 

Ive tried that - both deleting the sections entirely and just commenting them out. The end result is the months and year fields ending up on the main checkout page instead, right below "Guest Checkout" and "Create an account".

 

For arguments sake I just tried again, but the end result is the same...i'm totally lost on this...

 

https://1drv.ms/i/s!AquOTWV9rhK2gn-rfucKnG9Vtkhn

Edited by Ricky Blunda (see edit history)
Link to comment
Share on other sites

I've been experimenting with HTML-editing with the use of FireFox. I've found two instances, each apparently separate, for "Guest Checkout" and "Create an account" respectively.

 

If I comment out the section "<div class="select form-group date-select" style="">" the birthdate fields are removed, just as I want them to! But I cant figure out which .tpl file I should edit! Ive tried commenting out sections in identity.tpl, authentication.tpl and order-opc-new-account-advanced.tpl. But obviously, the fields are still there after editing these files.

 

Maybe there is another file that Ive overlooked?

 

P.S. Im using the one-page checkout option!

Edited by Ricky Blunda (see edit history)
Link to comment
Share on other sites

Ok, Ive checked and double checked. I've commented out the code from the following files:

 

- identity.tpl

- authentication.tpl

- order-opc-new-account.tpl

- order-opc-new-account-advanced.tpl

 

I've used <!--   --> to comment out the code. I've set cache to off, forced compile and cleared cache. Ive tried to set smart cache to on and off.

 

None of the above works. The date of birth fields are still there. What am I doing wrong?!

Edited by Ricky Blunda (see edit history)
Link to comment
Share on other sites

Yes! Finally it worked. I tripple checked all files, forced compilation AGAIN, cleared cache AGAIN, turned on some performance settings and finally it works! Not sure how or what I did, or if higher powers are involved (in which case I thank you, spirits), but as long as it works!

 

@Daresh: many thanks for replying. Nostrovia!

  • Like 1
Link to comment
Share on other sites

  • 1 year later...
  • 4 months later...

Hello,

I have the same problem as mentioned before. I want to remove the birth date.

I deleted the whole section from autehtication.tpl, identity.tpl, order-opc-new-account.tpl, order-opc-new-account-advanced.tpl

I set the forced recompilation option several times, I cleared the cache several times, I used three different computers and browsers, but the birth date is still there.....

 

Please help....what am I doing wrong? Thanks

Link to comment
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
×
×
  • Create New...