$customerSetup->addAttribute('customer_address', 'suburb', [
'label' => 'Suburb',
'input' => 'text',
'type' => 'varchar',
'source' => '',
'required' => true,
'position' => 70,
'visible' => true,
'system' => false,
'is_used_in_grid' => false,
'is_visible_in_grid' => false,
'is_filterable_in_grid' => false,
'is_searchable_in_grid' => false,
'backend' => ''
]);
$attribute = $customerSetup->getEavConfig()->getAttribute('customer_address', 'suburb')
->addData(['used_in_forms' => [
'adminhtml_customer_address',
'customer_address_edit',
'customer_register_address'
]]);
$attribute->save();`


im on it
It is not saved, because order address values are stored in "quote_address" and "sales_order_address" tables. By creating new customer address attribute, columns are not automatically created in the above tables.
There are more steps to add new address attribute in correct way:
$salesSetup = $this->salesSetupFactory->create(['setup' => $setup]);
$salesSetup->addAttribute('order_address', 'suburb', ['type' => 'text']);
$quoteSetup = $this->quoteSetupFactory->create(['setup' => $setup]);
$quoteSetup->addAttribute('quote_address', 'suburb', ['type' => 'text']);
<fieldset id="sales_convert_quote_address">
<field name="suburb">
<aspect name="to_order_address" />
</field>
</fieldset>
public function setSuburb($suburb)
{
return $this->setData('suburb', $suburb);
}
@ronakChauhanKrish thank you for your bug report.
We've created internal ticket MAGETWO-75304 to track progress on the issue
I am working on it at #mm17es
Reproduced the same error in Magento 2.2.1 with PHP 7.0.25
Hi @engcom-backlog-nazar. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:
Component: XXXXX label(s) to the ticket, indicating the components it may be related to.[x] 2. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[x] 3. Verify that the issue is reproducible on 2.2-develop branch. Details
- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x
[ ] 4. If the issue is not relevant or is not reproducible any more, feel free to close it.
@engcom-backlog-nazar Thank you for verifying the issue. Based on the provided information internal tickets MAGETWO-97682, MAGETWO-97683 were created
Most helpful comment
@ronakChauhanKrish thank you for your bug report.
We've created internal ticket MAGETWO-75304 to track progress on the issue