Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
finalizePartialProductExport example
$productExport
->
getSalesChannelDomain
(
)
->
getLanguageId
(
)
,
$this
->languageLocaleProvider->
getLocaleForLanguageId
(
$productExport
->
getSalesChannelDomain
(
)
->
getLanguageId
(
)
)
,
$context
->
getContext
(
)
)
;
$headerContent
=
$this
->productExportRender->
renderHeader
(
$productExport
,
$context
)
;
$footerContent
=
$this
->productExportRender->
renderFooter
(
$productExport
,
$context
)
;
$finalFilePath
=
$this
->productExportFileHandler->
getFilePath
(
$productExport
)
;
$this
->translator->
resetInjection
(
)
;
$writeProductExportSuccessful
=
$this
->productExportFileHandler->
finalizePartialProductExport
(
$filePath
,
$finalFilePath
,
$headerContent
,
$footerContent
)
;
$this
->connection->
delete
(
'sales_channel_api_context',
[
'token' =>
$contextToken
]
)
;
if
(
!
$writeProductExportSuccessful
)
{
return
;
}