Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setShippingAddress example
$addresses
=
$this
->addressGateway->
getList
(
$addressIds
)
;
foreach
(
$customers
as
$id
=> &
$customer
)
{
$addressId
=
$customer
->
getDefaultBillingAddressId
(
)
;
if
(
\
array_key_exists
(
$addressId
,
$addresses
)
)
{
$customer
->
setBillingAddress
(
$addresses
[
$addressId
]
)
;
}
$addressId
=
$customer
->
getDefaultShippingAddressId
(
)
;
if
(
\
array_key_exists
(
$addressId
,
$addresses
)
)
{
$customer
->
setShippingAddress
(
$addresses
[
$addressId
]
)
;
}
}
return
$customers
;
}
}