Jump to content

Removing Birth Date in customer account form [SOLVED]


Recommended Posts

I tried to learn to edit the CSS codes and followed the instructions given here:

http://doc.prestashop.com/display/PS14/Coding+a+theme

 

First, I made a copy of my theme folder per the instruction in the link above.

 

Then I followed the instructions about the code itself here

http://www.prestashop.com/forums/topic/269329-solved-remove-birthday-from-customer-account-details/

 

in order to delete the birth date in the customer account form.

 

I located the authentication.tpl file in the copy folder of my theme that I have just created and searched for this code:

 

<p class="select">
<span>{l s='Date of Birth'}</span>

 

I don't paste here the entire code but you can see it in full in the second link.

 

First thing, I see that in my codes there are no such things as <p> and <span> but <div> and <label>. Here is the copy of the code I have:

 

<div class="form-group">
                <label>{l s='Date of Birth'}</label>

 

I assume these are the same things. I tried to delete the code they had in the other thread (second link) and saved the changes. Nothing happened. I still see the birthday box in the customers form. Is there anything else I need to do? I'm so paranoid that I can screw the whole thing up that I don't want to experiment too much without good advice...

 

UPD:

 

I've been thinking why the code didn't work and then thought what if I changed the code in the original theme, not in the copy. And it worked! Originally, I was editing the code in the copy of my theme that I made since this is what I understood from the instructions in the first link at the beginning of this thread.

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

Try adding this <!-- to the beginning of the field and  --> at the end of the field.

This is what is called "commenting out" It leaves the code on the tpl file but does not render it on the page the user sees.

This is the safer way to do it so you can go back and enable the code in the future if needed.

 

Here is an example of what I did to remove this field in my theme in 1.5.3.1

  <!--<p class="select">
                            <span>{l s='Date of Birth'}</span>
                            <select id="days" name="days">
                                <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'}
                            *}
                            <select id="months" name="months">
                                <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>
                            <select id="years" name="years">
                                <option value="">-</option>
                                {foreach from=$years item=year}
                                   <option value="" {if ($sl_year == $year)} selected="selected"{/if}>{$year}  </option>
                                {/foreach}
                            </select>
                        </p>-->
Link to comment
Share on other sites

I've been thinking why the code didn't work and then thought what if I changed the code in the original theme, not in the copy. And it worked! Originally, I was editing the code in the copy of my theme that I made since this is what I understood from the instructions in the first link at the beginning of this thread.

 

I'm going to mark this thread as solved.

Link to comment
Share on other sites

To mark the thread solved - click the "mark solved" button next to the answer that worked.

Then edit your first post with more reply options. Click in the title and add (Solved) in front of your title - that's it

Glad it all worked out.

Link to comment
Share on other sites

×
×
  • Create New...