Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
clearExistingCookie example
Shopware
(
)
->
Container
(
)
->
get
(
CartPersistServiceInterface::
class
)
->
persist
(
)
;
}
$shop
=
Shopware
(
)
->
Shop
(
)
;
$this
->sSYSTEM->sUSERGROUP =
$shop
->
getCustomerGroup
(
)
->
getKey
(
)
;
$this
->sSYSTEM->sUSERGROUPDATA =
$shop
->
getCustomerGroup
(
)
->
toArray
(
)
;
$this
->sSYSTEM->sCurrency =
$shop
->
getCurrency
(
)
->
toArray
(
)
;
$this
->contextService->
initializeContext
(
)
;
$this
->csrfTokenValidator->
clearExistingCookie
(
)
;
if
(
!
$this
->config->
get
(
'clearBasketAfterLogout'
)
)
{
$this
->moduleManager->
Basket
(
)
->
sRefreshBasket
(
)
;
$countries
=
$this
->
sGetCountryList
(
)
;
$country
=
reset
(
$countries
)
;
if
(
!\
is_array
(
$country
)
)
{
$country
= null;
}
$this
->
sGetPremiumShippingcosts
(
$country
)
;