Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
doubleOptInSaveHash example
$this
->addressService->
setDefaultShippingAddress
(
$billing
)
;
}
if
(
(
$optinAttribute
=
$shop
->
getAttribute
(
'sendOptinMail'
)
)
!== null
&&
$optinAttribute
->
get
(
'sendOptinMail'
)
=== true
&&
$customer
->
getDoubleOptinRegister
(
)
&&
$customer
->
getDoubleOptinConfirmDate
(
)
=== null
)
{
$hash
= Random::
getAlphanumericString
(
32
)
;
$optinId
=
$this
->
doubleOptInSaveHash
(
$customer
,
$hash
)
;
$this
->
saveOptinIdToCustomer
(
$optinId
,
$customer
)
;
$this
->
doubleOptInVerificationMail
(
$shop
,
$customer
,
$hash
)
;
}
$this
->
saveReferer
(
$customer
)
;
$this
->modelManager->
commit
(
)
;
}
catch
(
Exception
$ex
)
{
$this
->modelManager->
rollback
(
)
;
throw
$ex
;
}
}