7

I am trying to make a zip code and postal code mandatory for shipping and billing information but i am not success kindly provide some solutions.

user6383
  • 71
  • 1
  • 1
  • 2

3 Answers3

15

Go to

System->Configuration->Default->General->Countries Options

Multiselect Box called ‘Postal Code is Optional for the following countries’.

Select the countries you want the field as optional.

As far as concerned with code changes, It is always recommended to follow inbuilt features instead of code changes.

TBI Infotech
  • 4,788
  • 1
  • 13
  • 30
1

The other way is to add required-entry class name to the fields by visiting the templates.

Mr_Green
  • 1,615
  • 4
  • 31
  • 50
1

their will be a text box for the zip code their please add "required-entry" in the class attribute of the zipcode textbox.then it is done

for eg.

<input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="required-entry input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />

see i had added required-entry in class above

Pradeep Sanku
  • 9,236
  • 2
  • 41
  • 73