Jump to content

[SOLVED] Remove Radio buttons and birthday prompt in customer's registration form


Recommended Posts

~~~~~~~~~~~~~~~~~~~~SOLVED~~~~~~~~~~~~~~~~~~~~~

Thanks to perfumeskunk

 

The easiest way to do this would be to comment out to parts of authentication.tpl: so, you need to go to:

public_html/yourtheme/themes/default/authentication.tpl

and at around line 372 you will see this:

 

<!-- <p class="radio required">
<span>{l s='Title'}</span>
{foreach from=$genders key=k item=gender}
<input type="radio" name="id_gender" id="id_gender{$gender->id}" value="{$gender->id}" {if isset($smarty.post.id_gender) && $smarty.post.id_gender == $gender->id}checked="checked"{/if} />
<label for="id_gender{$gender->id}" class="top">{$gender->name}</label>
{/foreach}
</p> -->

then at around line 396 you will see this:

<!-- <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="{$year}" {if ($sl_year == $year)} selected="selected"{/if}>{$year}  </option>
{/foreach}
</select>
</p> -->

 

 

Hello everyone, does anyone know how to remove the radio buttons for title Mr, Ms, and, Miss. I also want to remove the birthday prompt on the registration form

 

I attached the screenshot along with this post.

 

 

Thanks

post-591325-0-47303200-1371252952_thumb.png

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

Good morning,

 

Using ps 1.5.4 default theme

 

The easiest way to do this would be to comment out to parts of authentication.tpl: so, you need to go to:

 

public_html/yourtheme/themes/default/authentication.tpl

 

and at around line 372 you will see this:

 

<!-- <p class="radio required">

<span>{l s='Title'}</span>

{foreach from=$genders key=k item=gender}

<input type="radio" name="id_gender" id="id_gender{$gender->id}" value="{$gender->id}" {if isset($smarty.post.id_gender) && $smarty.post.id_gender == $gender->id}checked="checked"{/if} />

<label for="id_gender{$gender->id}" class="top">{$gender->name}</label>

{/foreach}

</p> -->

 

then at around line 396 you will see this:

 

<!-- <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="{$year}" {if ($sl_year == $year)} selected="selected"{/if}>{$year}  </option>

{/foreach}

</select>

</p> -->

 

You can see the result attached

 

NB. I do not know if prestashop uses this information anywhere else which is why it is better to comment out rather than delete

 

Hope this helps

 

Paul

post-321361-0-13224700-1371308923_thumb.png

  • Like 1
Link to comment
Share on other sites

Thanks Paul ! it was easier than I thought it would be..

 

I have another question, how did u know that it was supposed to be authentication.tpl instead of other .tpl files in the directory

I'm asking this so I'll be able to comment out similar case with different .tpl source in the future

Link to comment
Share on other sites

Good morning,

 

Pleased its worked for you.

 

Practice I suppose, but basically if it's wording it's tpl and if it's colours/design it's css.

 

If use chrome or firebug they both have developers tools, in this case you gave a screenshot so I looked at the same page on my site and the colours could be changed by authentication.css so authentication.tpl followed from that

 

Hope this makes sense.

 

Also as I said in previous post, I use commenting out just incase you want to go back to the original at a later date

 

Paul

Link to comment
Share on other sites

  • 8 months later...

Ok I tried that and it didn't work. Default page is being used. I copied the file if someone could help it would be appreciated. This was at line 523

 

<!--<p class="radio required">
   <span>{l s='Title'}</span>
   {foreach from=$genders key=k item=gender}
    <input type="radio" name="id_gender" id="id_gender{$gender->id}" value="{$gender->id}" {if isset($smarty.post.id_gender) && $smarty.post.id_gender == $gender->id}checked="checked"{/if} />
    <label for="id_gender{$gender->id}" class="top">{$gender->name}</label>
   {/foreach}
  </p>-->
  <p class="required text">
   <label for="customer_firstname">{l s='First name'} <sup>*</sup></label>
   <input onkeyup="$('#firstname').val(this.value);" type="text" class="text" id="customer_firstname" name="customer_firstname" value="{if isset($smarty.post.customer_firstname)}{$smarty.post.customer_firstname}{/if}" />
  </p>
  <p class="required text">
   <label for="customer_lastname">{l s='Last name'} <sup>*</sup></label>
   <input onkeyup="$('#lastname').val(this.value);" type="text" class="text" id="customer_lastname" name="customer_lastname" value="{if isset($smarty.post.customer_lastname)}{$smarty.post.customer_lastname}{/if}" />
  </p>
  <p class="required text">
   <label for="email">{l s='Email'} <sup>*</sup></label>
   <input type="text" class="text" id="email" name="email" value="{if isset($smarty.post.email)}{$smarty.post.email}{/if}" />
  </p>
  <p class="required password">
   <label for="passwd">{l s='Password'} <sup>*</sup></label>
   <input type="password" class="text" name="passwd" id="passwd" />
   <span class="form_info">{l s='(Five characters minimum)'}</span>
  </p><!--
  <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="{$year}" {if ($sl_year == $year)} selected="selected"{/if}>{$year}  </option>
    {/foreach}
   </select>
  </p>-->
  {if $newsletter}

 

Also at line 243 and 261, I commented out radio and birthday in both places of the file. still doesn't work, need some help please
 

Link to comment
Share on other sites

×
×
  • Create New...