Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
initMailing example
}
}
else
{
$mailingID
=
(int)
$this
->
Request
(
)
->
getParam
(
'campaign'
)
;
$mailaddressID
=
(int)
$this
->
Request
(
)
->
getParam
(
'mailaddress'
)
;
$hash
=
$this
->
createHash
(
$mailaddressID
,
$mailingID
)
;
if
(
$hash
!==
$this
->
Request
(
)
->
getParam
(
'hash'
)
)
{
return
;
}
}
$mailing
=
$this
->
initMailing
(
$mailingID
)
;
if
(
!\
is_array
(
$mailing
)
)
{
return
;
}
$template
=
$this
->
initTemplate
(
$mailing
)
;
if
(
!
empty
(
$mailaddressID
)
)
{
$sql
= 'SELECT email FROM s_campaigns_mailaddresses WHERE id=?';
$email
=
Shopware
(
)
->
Db
(
)
->
fetchOne
(
$sql
,
[
$mailaddressID
]
)
;
$user
=
$this
->
getMailingUserByEmail
(
$email
)
;
$template
->
assign
(
'sUser',
$user
, true
)
;