Jump to content

Editing One Page Checkout required form fields


Recommended Posts

HI there

 

I am trying to change the "required" option on my one page checkout form fields in Presta Shop

 

I think I have found the file in which to do so?

 

"order-opc-new-account.tpl" - in my themes folder.    

 

___________________________________________________

 

I have removed the asterisk (*) from the field labels, "First Name" and "Last name" however the fields still remain as "required" - even with the (*) removed ?

 

Please can you assist me in changing the code so that these fields are NOT required. 

 

thank you

___________________________________________________

 

 

<div class="required form-group">
<label for="firstname">{l s='First name'} <sup></sup></label>
<input type="text" class="text form-control validate" id="customer_firstname" name="customer_firstname" onblur="$('#firstname').val($(this).val());" data-validate="isName" value="{if isset($guestInformations) && isset($guestInformations.customer_firstname) && $guestInformations.customer_firstname}{$guestInformations.customer_firstname}{/if}" />
</div>
<div class="required form-group">
<label for="lastname">{l s='Last name'} <sup></sup></label>
<input type="text" class="form-control validate" id="customer_lastname" name="customer_lastname" onblur="$('#lastname').val($(this).val());" data-validate="isName" value="{if isset($guestInformations) && isset($guestInformations.customer_lastname) && $guestInformations.customer_lastname}{$guestInformations.customer_lastname}{/if}" />
</div>

 

post-1309063-0-02278200-1473707073_thumb.png

Link to comment
Share on other sites

While of course a solution to this problem exists, I cannot help but wonder why you would not want to know the name and surname of your customers (if anything, if you're not interested in that information, you could delete the fields altogether). The sole thing I came up with is that you are looking to offer something similar to a guest checkout, which is already a feature in the default PrestaShop installation.

 

Are you sure what you're asking is actually the behaviour you are looking for?

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

  • 1 month later...
  • 3 months later...

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