Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
updateEnMailSubject example
return
1652345915;
}
public
function
update
(
Connection
$connection
)
: void
{
$mailSubjectUpdate
=
new
MailSubjectUpdate
(
MailTemplateTypes::MAILTYPE_STATE_ENTER_ORDER_DELIVERY_STATE_SHIPPED,
'Your order with {{ salesChannel.name }} is shipped'
)
;
$this
->
updateEnMailSubject
(
$connection
,
$mailSubjectUpdate
)
;
}
public
function
updateDestructive
(
Connection
$connection
)
: void
{
// implement update destructive
}
}
use
ImportTranslationsTrait;
final
protected
function
updateMail
(
MailUpdate
$update
, Connection
$connection
)
: void
{
$this
->
updateEnMail
(
$connection
,
$update
)
;
$this
->
updateDeMail
(
$connection
,
$update
)
;
}
final
protected
function
updateMailSubject
(
MailSubjectUpdate
$update
, Connection
$connection
)
: void
{
$this
->
updateEnMailSubject
(
$connection
,
$update
)
;
$this
->
updateDeMailSubject
(
$connection
,
$update
)
;
}
private
function
updateDeMail
(
Connection
$connection
, MailUpdate
$update
)
: void
{
$languages
=
$this
->
getLanguageIds
(
$connection
, 'de-DE'
)
;
if
(
!
$languages
)
{
return
;
}
$this
->
getSignupPlainTemplateDe
(
)
,
$this
->
getSignupHtmlTemplateDe
(
)
)
;
$this
->
updateMail
(
$mailUpdate
,
$connection
)
;
$mailSubjectUpdate
=
new
MailSubjectUpdate
(
MailTemplateTypes::MAILTYPE_CUSTOMER_REGISTER,
'Your sign-up with {{ salesChannel.translated.name }}'
)
;
$this
->
updateEnMailSubject
(
$connection
,
$mailSubjectUpdate
)
;
// update customer register double opt in
$mailUpdate
=
new
MailUpdate
(
MailTemplateTypes::MAILTYPE_CUSTOMER_REGISTER_DOUBLE_OPT_IN,
$this
->
getSignupConfirmationPlainTemplateEn
(
)
,
$this
->
getSignupConfirmationHtmlTemplateEn
(
)
)
;
$this
->
updateEnMail
(
$connection
,
$mailUpdate
)
;
$mailSubjectUpdate
=
new
MailSubjectUpdate
(
MailTemplateTypes::MAILTYPE_CUSTOMER_REGISTER_DOUBLE_OPT_IN,