Loading

0.8.7.2 account/address-book/new

4 posts / 0 new
Last post
Anonymous
0.8.7.2 account/address-book/new

Hello,

allowed countries: Italy(no-zones/states defines), Germany,Austria
default_country: Italy(no-zones/states defined)

when i register a new account and then add(edit) a new address, the zone select field is visible with zones from Austria.

Subsequent ajax changes to country_id select correctly set zone/state fields visibility and values.

Regards,

Maks

Offline
Joined: 11/21/2011

Maybe the bug is in line 154?

$defaultCountry = current($countryIds);// => The 1st in the list, in my case Austria

shouldn'it be:

$defaultCountry = Axis::config('account/address_form/country_id_value');

Regards,

Maks

## CORRECTION : THIS DOES NOT TAKE INTO ACCOUNT edit ACTION ##
## SOLUTION

after line 280 of Axis_Account_Model_Form_Address it should be added:

        else
        {
            $this->getElement('zone_id')->setAttribs(array(
                'options' =>  array()
            ));
            $this->setDefault('zone_id', '');
        }

setting to an empty array the zone select element whenever there are no zones for the (populated) country_id.

Regards,

Maks

Offline
Joined: 11/21/2011

Same issue and solution for:

Axis_Checkout_Model_Form_Address

Offline
Joined: 10/12/2010

Thank you. Ticket is created for this issue: https://github.com/axis/axiscommerce/issues/195