Anmol singh
Anmol singh

Reputation: 158

Remove mandatory Address field from Signup Page :Opencart 2.3.0.2

i am able to delete non-required fields like: address2, but how can i remove mandatory Address field from Signup Page only, and so that then it ask address only on checkout page.

So, after disabling Address field, we have to make changes on checkout page to ask address mandatory. I am learning php MVC, and really excited how can i do this.

Upvotes: 2

Views: 481

Answers (1)

Mujahid Bhoraniya
Mujahid Bhoraniya

Reputation: 1584

Step : 1

Path : catalog/view/theme/default/template/account/register.tpl

Step : 2

Remove Lines: 249-263

OR

Find below lines and remove them.

ADDESS - 1 :

<div class="form-group required">
            <label class="col-sm-2 control-label" for="input-address-1"><?php echo $entry_address_1; ?></label>
            <div class="col-sm-10">
              <input type="text" name="address_1" value="<?php echo $address_1; ?>" placeholder="<?php echo $entry_address_1; ?>" id="input-address-1" class="form-control" />
              <?php if ($error_address_1) { ?>
              <div class="text-danger"><?php echo $error_address_1; ?></div>
              <?php } ?>
            </div>
          </div>

ADDESS - 2 :

<div class="form-group">
    <label class="col-sm-2 control-label" for="input-address-2"><?php echo $entry_address_2; ?></label>
    <div class="col-sm-10">
        <input type="text" name="address_2" value="<?php echo $address_2; ?>" placeholder="<?php echo $entry_address_2; ?>" id="input-address-2" class="form-control" />
    </div>
</div>

Upvotes: 3

Related Questions