1

The error message I'm getting is:

the State and Province are not entered.

This error occurs in Customer View at checkout when you're trying to purchase a product.

It happens both when you're entering billing address and different shipping address.

I am using Magento Version 1.9.0.1

1 Answer 1

1

If the error message is Please enter the state/province. then this happens on the address validation. You can see this in the class Mage_Customer_Model_Address_Abstract::_basicCheck. It gets into this error when there is no region selected and the region is required for the country attached to the address.

if ($this->getCountryModel()->getRegionCollection()->getSize()
    && !Zend_Validate::is($this->getRegionId(), 'NotEmpty')
    && Mage::helper('directory')->isRegionRequired($this->getCountryId())
) {
    $this->addError(Mage::helper('customer')->__('Please enter the state/province.'));
}

This would normally happen with one of two things.

  1. A custom template has removed/modified the fields so they are not submitted when required,
  2. The attributes are not set to be used against the correct forms,

Easiest way to test the first one is to reset to the default theme and see if the problem still occurs. If the problem does still occur then you can check the table customer_form_attribute to make sure the attributes are attached to the correct forms.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.