Jump to content

How to make address field not required


Recommended Posts

Hi

 

Prestashop 1.6. I need to make address and city field not required. I tried replacing

 

<p class="required form-group">
                    <label for="dni">{l s='Address'} <sup>*</sup></label>

 

to

 

<div class="form-group is_customer_param">
                            <label for="address1_invoice">{l s='Address'}{if in_array($field_name, $required_fields)} <sup>*</sup>{/if}</label>

 

on authentication.tpl but this did not help. Any help is appreciated, i already tried old topics but did not find working solution.

Link to comment
Share on other sites

  • 8 months later...

Took some time for dummie like me to figure it out, but if anyone else needs to do it, then in classes/address.php remove "'required' => true" on this line (or where neccessary):

'address1' =>            array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'required' => true, 'size' => 128),

and then modify on theme folder files address.tpl and authentication.tpl (make address1 similar to address2).

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