Jump to content
thirty bees forum

Recommended Posts

Posted

You will need to edit some of the templates. Starting with authentication.tpl. for removal on first account creation.

If you want to remove it completely, even when customer adds address or modifies personal data, than you will also need to edit address.tpl and identity.tpl.

Posted

Hi prophoto,

To disable the date of birth in TB 1.0.3 and 1.0.4 you need to edit the following files :

authentification-create.tpl : from line 34 to 76 authentification-create-opc.tpl : from line 29 to 71 identity.tpl : from line 49 to 91

The div to comment/delete is written like this :

If your shop is already up and running you also need to reset all customers dates of birth in your database.

Posted

Actually no need to mod the .tpl files

A quick search a few days ago resulted in me finding this: https://forum.thirtybees.com/post/12560

A nice solution to the problem without having to tamper with the TPL files :)

  • 11 months later...
Posted
On 6/14/2018 at 6:21 AM, RaptorX said:

Actually no need to mod the .tpl files

A quick search a few days ago resulted in me finding this: https://forum.thirtybees.com/post/12560

A nice solution to the problem without having to tamper with the TPL files :)

Hello, sorry for bumping up this old post but I am looking to do the same thing and the link you posted is now invalid. Do you happen to remember what it said to do?

  • 3 weeks later...
Posted (edited)
On 5/16/2019 at 1:24 PM, vince said:

Hello, sorry for bumping up this old post but I am looking to do the same thing and the link you posted is now invalid. Do you happen to remember what it said to do?

I believe they were probably linking to the thread that contained this comment. Just in case this link at some point gets broken too, here is what it suggested:

> alwayspaws if i recall right you are using transformer theme you can actually just use CSS to hide the fields 🙂
> Go to Modules >> Theme editor >> Custom Codes >> And add this below to Custom CSS Code
> .account_creation .date-select { display: none; }
> Since DOB is not required field this should not give any issues at all.

Credit to @bzndk for the great solution.

Edit: Full solution for TB 1.0.8 (may work on other versions too) is here:

 

Edited by dynambee
Posted
1 hour ago, elpak said:

why do you want to do that? GDPR issue?

A lot of customers really don't like being asked for information that is not necessary for the successful delivery of their order.

Posted
6 hours ago, elpak said:

why do you want to do that? GDPR issue?

I personally don't want to store data like that in a shops DB let alone give it to the Government.  They are supposed to have it.. 🙂 I live in the US.

 

5 hours ago, dynambee said:

really don't like being asked for information that is not necessary for the successful delivery of their order.

Agreed

@elpak Welcome to the forum and TB.

Posted
On 6/5/2019 at 4:58 AM, dynambee said:

.account_creation .date-select { display: none; }

Where can I do this in the Standard Community theme?

Posted
On 6/14/2018 at 10:26 AM, Gotabor said:

Hi prophoto,

To disable the date of birth in TB 1.0.3 and 1.0.4 you need to edit the following files :

authentification-create.tpl : from line 34 to 76 authentification-create-opc.tpl : from line 29 to 71 identity.tpl : from line 49 to 91

The div to comment/delete is written like this :

If your shop is already up and running you also need to reset all customers dates of birth in your database.
  •  

@Brent DacusI think you'll need to do this. What you're quoting is for a theme called Transformer.

  • Thanks 1
Posted
1 minute ago, 30knees said:

I think you'll need to do this.

ok thanks I will look at it.  

Aside:  I don't see a Theme called Transformer in the marketplace.  This might be another post..  Is it a good theme?

Posted
11 minutes ago, 30knees said:

To disable the date of birth in TB 1.0.3 and 1.0.4 you need to edit the following files :

authentication-create.tpl : from line 34 to 76 authentication-create-opc.tpl : from line 29 to 71 identity.tpl : from line 49 to 91

 

I can confirm this works in TB 1.08 on the Community Theme.  Here is example of authentication-create.tpl

    <!-- Remove DOB-->
      <!---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}&nbsp;&nbsp;</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}&nbsp;</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}&nbsp;&nbsp;</option>
            {/foreach}
          </select>
        </div>
      </div>
    </div--->

 

  • Like 1
Posted

You can add it to the bottom of the global.css file which is located in /themes/community-theme-default/css

I just tested it with TB 1.0.8 and adding the single CSS line to the bottom of the file caused the DOB request to vanish from the account creation page.

  • Like 2
Posted
5 minutes ago, dynambee said:

You can add it to the bottom of the global.css file which is located in /themes/community-theme-default/css

I wondered would that work.

 

Posted
5 minutes ago, Brent Dacus said:

I wondered would that work.

It definitely works. It removes it from the account creation page, but it leaves it visible in the "My account" area. If someone *really* wants to give their DOB they can still do it, but they can also completely ignore it which most users will likely do. The big thing is that they aren't asked for their DOB when creating an account.

Of course as with any theme file edits, they will be lost if/when the theme is updated. I keep a separate record in a local text file of any changes I make so I can redo them after doing an update.

  • Like 1
Posted (edited)

Okay, I have actually worked out how to hide it in all three places that it appears.

The following lines need to be added to the Add extra css to your pages section in the Preferences/Custom Code area of your TB back office:

/* For desktop browser account creation, add this line: */
.account_creation .date-select { display: none; }

/* For mobile browser account creation add this line: */
#opc_account_form .date-select { display: none; }

/* For the user's "My account" page that they can see after they sign up, add this line: */
#identity .std .date-select { display: none; }

The commented lines (/* ... */) do not need to be added, only the code lines that start with . or #. Copy & paste to avoid errors.

I have tested the above on TB 1.0.8 with the standard community theme (obviously) and it is working without trouble.

Edited by dynambee
Better area to put the custom CSS as suggested by @Brent Dacus
  • Like 1
  • Thanks 3

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