Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
dev
tests
integration
testsuite
Magento
Sales
_files
address_list.php
Go to the documentation of this file.
1
<?php
7
$addresses
= [
8
[
9
'telephone'
=> 3234676,
10
'postcode'
=> 47676,
11
'country_id'
=>
'US'
,
12
'city'
=>
'CityX'
,
13
'street'
=> [
'Black str, 48'
],
14
'lastname'
=>
'Smith'
,
15
'firstname'
=>
'John'
,
16
'address_type'
=>
'shipping'
,
17
'email'
=>
'
[email protected]
'
,
18
'region_id'
=> 1,
19
],
20
[
21
'telephone'
=> 3234676,
22
'postcode'
=>
'47676'
,
23
'country_id'
=>
'US'
,
24
'city'
=>
'CityX'
,
25
'street'
=> [
'Black str, 48'
],
26
'lastname'
=>
'Smith'
,
27
'firstname'
=>
'John'
,
28
'address_type'
=>
'billing'
,
29
'email'
=>
'
[email protected]
'
,
30
'region_id'
=> 1,
31
],
32
[
33
'telephone'
=> 123123,
34
'postcode'
=>
'ZX0789'
,
35
'country_id'
=>
'US'
,
36
'city'
=>
'Ena4ka'
,
37
'street'
=> [
'Black'
,
'White'
],
38
'lastname'
=>
'Doe'
,
39
'firstname'
=>
'John'
,
40
'address_type'
=>
'billing'
,
41
'email'
=>
'
[email protected]
'
,
42
'region_id'
=> 2,
43
],
44
[
45
'telephone'
=> 123123,
46
'postcode'
=>
'ZX0789A'
,
47
'country_id'
=>
'US'
,
48
'city'
=>
'Ena4ka'
,
49
'street'
=> [
'Black'
,
'White'
],
50
'lastname'
=>
'Doe'
,
51
'firstname'
=>
'John'
,
52
'address_type'
=>
'shipping'
,
53
'email'
=>
'
[email protected]
'
,
54
'region_id'
=> 1,
55
]
56
];
57
59
foreach
(
$addresses
as
$addressData
) {
61
$address
=
\Magento\TestFramework\Helper\Bootstrap::getObjectManager
()->create(
62
\
Magento
\Sales\Model\Order\Address::class
63
);
64
$address
65
->setData(
$addressData
)
66
->save();
67
}
$addresses
$addresses
Definition:
address_list.php:7
$address
$address
Definition:
customer.php:38
$addressData
$addressData
Definition:
order.php:19
Magento
Magento\TestFramework\Helper\Bootstrap\getObjectManager
static getObjectManager()
Definition:
Bootstrap.php:125