Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setRemoteAddress example
private
function
buildCustomerEntity
(
string
$id
)
: CustomerEntity
{
$customerEntity
=
new
CustomerEntity
(
)
;
$customerEntity
->
setId
(
$id
)
;
$customerEntity
->
setEmail
(
'
[email protected]
'
)
;
$customerEntity
->
setFirstName
(
'Max'
)
;
$customerEntity
->
setLastName
(
'Smith'
)
;
$customerEntity
->
setTitle
(
'Dr.'
)
;
$customerEntity
->
setCompany
(
'Acme Inc.'
)
;
$customerEntity
->
setCustomerNumber
(
'ABC123XY'
)
;
$customerEntity
->
setRemoteAddress
(
'Test street 123, NY'
)
;
$customerEntity
->
setCustomFields
(
[
'customerGroup' => 'premium', 'origin' => 'newsletter', 'active' => true
]
)
;
return
$customerEntity
;
}
}