Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getDocumentTemplate example
throw
new
RuntimeException
(
sprintf
(
"Shop '%s (id: %s)' has no customer group.",
$shop
->
getName
(
)
,
$shop
->
getId
(
)
)
)
;
}
$shop
->
getCurrency
(
)
;
$shop
->
getLocale
(
)
;
$mainShop
=
$shop
->
getMain
(
)
??
$shop
;
if
(
!
$mainShop
->
getTemplate
(
)
)
{
throw
new
RuntimeException
(
sprintf
(
"Shop '%s (id: %s)' has no template.",
$shop
->
getName
(
)
,
$shop
->
getId
(
)
)
)
;
}
if
(
!
$mainShop
->
getDocumentTemplate
(
)
)
{
throw
new
RuntimeException
(
sprintf
(
"Shop '%s (id: %s)' has no document template.",
$shop
->
getName
(
)
,
$shop
->
getId
(
)
)
)
;
}
}
private
function
refreshCart
(
Shop
$shop
)
: void
{
$this
->
get
(
ShopRegistrationServiceInterface::
class
)
->
registerShop
(
$shop
)
;
$modules
=
$this
->
get
(
'modules'
)
;
if
(
empty
(
$this
->
get
(
'session'
)
->
get
(
'sUserId'
)
)
)
{