Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
renderBody example
foreach
(
$productResult
->
getEntities
(
)
as
$product
)
{
$data
=
$productContext
->
getContext
(
)
;
$data
[
'product'
]
=
$product
;
if
(
$productExport
->
isIncludeVariants
(
)
&& !
$product
->
getParentId
(
)
&&
$product
->
getChildCount
(
)
> 0
)
{
continue
; // Skip main product if variants are included
}
if
(
!
$productExport
->
isIncludeVariants
(
)
&&
$product
->
getParentId
(
)
)
{
continue
; // Skip variants unless they are included
}
$body
.=
$this
->productExportRender->
renderBody
(
$productExport
,
$context
,
$data
)
;
}
if
(
$exportBehavior
->
batchMode
(
)
)
{
break
;
}
}
$content
.=
$this
->seoUrlPlaceholderHandler->
replace
(
$body
,
$productExport
->
getSalesChannelDomain
(
)
->
getUrl
(
)
,
$context
)
;
if
(
$exportBehavior
->
generateFooter
(
)
)
{
$content
.=
$this
->productExportRender->
renderFooter
(
$productExport
,
$context
)
;
}