Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
batchMode example
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
)
;
}
$encodingEvent
=
$this
->eventDispatcher->
dispatch
(
new
ProductExportChangeEncodingEvent
(
$productExport
,
$content
,
mb_convert_encoding
(
$content
,
$productExport
->
getEncoding
(
)
)
)
)
;