Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getCustomerAddress example
$customer
=
new
CustomerEntity
(
)
;
$customer
->
setId
(
'customer-id'
)
;
$customer
->
setEmail
(
'customer-email'
)
;
$customer
->
setSalutationId
(
'customer-salutation-id'
)
;
$customer
->
setFirstName
(
'customer-first-name'
)
;
$customer
->
setLastName
(
'customer-last-name'
)
;
$customer
->
setCustomerNumber
(
'customer-number'
)
;
$customer
->
setGroupId
(
'customer-group-id'
)
;
if
(
!
$withoutBillingAddress
)
{
$customer
->
setDefaultBillingAddress
(
$this
->
getCustomerAddress
(
)
)
;
}
return
$customer
;
}
private
function
getCustomerAddress
(
)
: CustomerAddressEntity
{
$address
=
new
CustomerAddressEntity
(
)
;
$address
->
setId
(
'billing-address-id'
)
;
$address
->
setSalutationId
(
'billing-address-salutation-id'
)
;
$address
->
setFirstName
(
'billing-address-first-name'
)
;