mandatory address fields won't update.

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
woo13244
Posts: 10
Joined: 02 Aug 2018, 21:49

mandatory address fields won't update.

Post by woo13244 » 09 Aug 2018, 15:20

I have had luck with changing mandatory fields before but now when I try to add the states field into the mandatory array the view never updates. I even checked the source page to discover all other hidden elements are present with a display of none but the state list item is not there at all. this is my Address\Deliver\Standard.php. I have tried to php artisan aimeos:cache + deleting browser history + artisan view:clear but nothing seems to get the state field to show


```
private $mandatory = array(
'order.base.address.salutation',
'order.base.address.firstname',
'order.base.address.lastname',
'order.base.address.address1',
'order.base.address.countryid',
'order.base.address.state',
'order.base.address.postal',
'order.base.address.city',
);

private $optional = array(
'order.base.address.company',
'order.base.address.vatid',
'order.base.address.address2',
);
```

User avatar
aimeos
Administrator
Posts: 7873
Joined: 01 Jan 1970, 00:00

Re: mandatory address fields won't update.

Post by aimeos » 10 Aug 2018, 12:31

Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

woo13244
Posts: 10
Joined: 02 Aug 2018, 21:49

Re: mandatory address fields won't update.

Post by woo13244 » 10 Aug 2018, 13:23

I actually figured this one out. I had to add the client/html/checkout/standard/address/states US states array.


```
$view->addressStates = $view->config( 'client/html/checkout/standard/address/states', [
'US' => array(
'AL' => 'Alabama',
'AK' => 'Alaska',
'AZ' => 'Arizona',
'AR' => 'Arkansas',
'CA' => 'California',
'CO' => 'Colorado',
'CT' => 'Connecticut',
'DE' => 'Delaware',
'FL' => 'Florida',
'GA' => 'Georgia',
'HI' => 'Hawaii',
'ID' => 'Idaho',
'IL' => 'Illinois',
'IN' => 'Indiana',
'IA' => 'Iowa',
'KA' => 'Kansas',
'KY' => 'Kentucky',
'LA' => 'Louisiana',
'ME' => 'Maine',
'MD' => 'Maryland',
'MA' => 'Massachusetts',
'MI' => 'Michigan',
'MN' => 'Minnesota',
'MS' => 'Mississippi',
'MO' => 'Missouri',
'MT' => 'Montana',
'NE' => 'Nebraska',
'NV' => 'Nevada',
'NH' => 'New Hampshire',
'NJ' => 'New Jersey',
'NM' => 'New Mexico',
'NY' => 'New York',
'NC' => 'North Carolina',
'ND' => 'North Dakota',
'OH' => 'Ohio',
'OK' => 'Oklahoma',
'OR' => 'Oregon',
'PA' => 'Pennsylvania',
'RI' => 'Rhode Island',
'SC' => 'South Carolina',
'SD' => 'South Dakota',
'TN' => 'Tennessee',
'TX' => 'Texas',
'UT' => 'Utah',
'VT' => 'Vermont',
'VA' => 'Virginia',
'WA' => 'Washington',
'WV' => 'West Virginia',
'WI' => 'Wisconsin',
'WY' => 'Wyoming',
)
] );

```

Post Reply