Jump to content

[SOLVED] remove Birthday option


Recommended Posts

Customer birthdays are optional, but they are used in some of the statistics and some modules like the Birthday Present module. If you aren't using any modules or statistics that need the birthday, it is safe to remove. Just remove or

<!-- comment out -->

the following code in authentication.tpl and identity.tpl in your theme directory:



{l s='Birthday'}

-
                   {foreach from=$days item=v}
{$v|escape:'htmlall':'UTF-8'}  
                   {/foreach}

               {*
                   {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'}
               *}

-
                   {foreach from=$months key=k item=v}
{l s="$v"} 
                   {/foreach}


-
                   {foreach from=$years item=v}
{$v|escape:'htmlall':'UTF-8'}  
                   {/foreach}


  • Like 4
Link to comment
Share on other sites

  • 1 year later...

Using presta version 1.4.2 and can't for the life of me get rid of the birthday. (this should be an option in the B.O. I would think...)

Anyways, I have deleted the birthday code from 3 files so far, and it still shows up in instant checkout. Any thoughts? Is there another place where this code is hiding?

Thanks...

Link to comment
Share on other sites

I fixed this by deleting the birthday code from the files listed and then I had to delete the cache from FTP - Prestashop/Smarty/ then folders Cache and compile

Delete the files (I deleted all but index.php) and then it should work.

Link to comment
Share on other sites

Glad you figured it out. An easier way is to simply go to the Preferences > Performance tab and change "Force compile" to "Yes", refresh your website, then change it back to "No". It's much easier than deleting all the compiled files manually using FTP.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...

I have noticed a second occurrance of the code in authentication.tpl. But commenting out or deleting this also only moves the layout around and removes a little part of it in registration. It does nothing to /order-opc (one page checkout)...

Link to comment
Share on other sites

  • 5 weeks later...
  • 3 years later...

Has the syntax changed for version 1.6?

I believe the text has changed to "Date of Birth", but it's not just that, but part of the code syntax as well..

Coud you please advise where (in authentication.tpl and Identity.tpl the code needs to be commented out?

 

Thanks!

 

Ariel

Link to comment
Share on other sites

  • 4 months later...

Customer birthdays are optional, but they are used in some of the statistics and some modules like the Birthday Present module. If you aren't using any modules or statistics that need the birthday, it is safe to remove. Just remove or

<!-- comment out -->
the following code in authentication.tpl and identity.tpl in your theme directory:

 

<p class="select">                <label>{l s='Birthday'}</label>                <select name="days" id="days">                    <option value="">-</option>                    {foreach from=$days item=v}                        <option value="{$v|escape:'htmlall':'UTF-8'}" {if ($sl_day == $v)}selected="selected"{/if}>{$v|escape:'htmlall':'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'}                *}                <select id="months" name="months">                    <option value="">-</option>                    {foreach from=$months key=k item=v}                        <option value="{$k|escape:'htmlall':'UTF-8'}" {if ($sl_month == $k)}selected="selected"{/if}>{l s="$v"} </option>                    {/foreach}                </select>                <select id="years" name="years">                    <option value="">-</option>                    {foreach from=$years item=v}                        <option value="{$v|escape:'htmlall':'UTF-8'}" {if ($sl_year == $v)}selected="selected"{/if}>{$v|escape:'htmlall':'UTF-8'}  </option>                    {/foreach}                </select>            </p>

Indeed, the files from which you must comment out the code are: authentication.tpl and identity.tpl but also order-opc-new-account.tpl.

 

The code I had to comment out was:

<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>

After that, do this:

 

go to the Preferences > Performance tab and change "Force compile" to "Yes", refresh your website, then change it back to "No"

just like rocky said.

 

It worked for me

Link to comment
Share on other sites

  • 7 months later...

For those still having issues with this I have found the source of confusion.  

 

When commenting out the suggested code you'll need to comment it out in two different locations of authentication.tpl.  

 

On my current version (1.6.1.4) I found the same code on line 468 and 138.  

  • Like 2
Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...
  • 1 year later...
En 29/2/2016 a las 6:55 AM, Simple Kiwi dijo:

Para aquellos que todavía tienen problemas con esto, he encontrado la fuente de la confusión.  

 

Al comentar el código sugerido, deberá comentarlo en dos ubicaciones diferentes de authentication.tpl.  

 

En mi versión actual (1.6.1.4) encontré el mismo código en la línea 468 y 138.  

ok, is correct.

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...