parse manufacturer longdesc through Smarty

This commit is contained in:
Daniel Seifert 2024-12-05 12:15:33 +01:00
parent 81b48e7f58
commit a47d69b294

View File

@ -34,12 +34,22 @@ class ManufacturerInfoList extends ManufacturerInfoList_parent
parent::_addCategoryFields($oManufacturer);
if (Registry::getConfig()->getConfigParam('d3manufacturerinformation_showManufacturertextOnManufacturerPage')) {
$oManufacturer->oxcategories__oxlongdesc = new Field(
html_entity_decode(
$oManufacturer->getFieldData( Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME ) ?? ''
),
Field::T_RAW
);
/** @var \OxidEsales\Eshop\Core\UtilsView $oUtilsView */
$oUtilsView = Registry::getUtilsView();
$longdesc = $oManufacturer->d3GetLongdesc()->getRawValue() ?? '';
$deactivateSmarty = Registry::getConfig()->getConfigParam('deactivateSmartyForCmsContent');
$processLongDescriptions = Registry::getConfig()->getConfigParam('bl_perfParseLongDescinSmarty');
if (!$deactivateSmarty && $processLongDescriptions) {
$longdesc = $oUtilsView->parseThroughSmarty(
$longdesc,
$oManufacturer->getId() . $oManufacturer->getLanguage(),
null,
true
) ?? '';
}
$oManufacturer->oxcategories__oxlongdesc = new Field(html_entity_decode($longdesc), Field::T_RAW);
}
}
}