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); parent::_addCategoryFields($oManufacturer);
if (Registry::getConfig()->getConfigParam('d3manufacturerinformation_showManufacturertextOnManufacturerPage')) { if (Registry::getConfig()->getConfigParam('d3manufacturerinformation_showManufacturertextOnManufacturerPage')) {
$oManufacturer->oxcategories__oxlongdesc = new Field( /** @var \OxidEsales\Eshop\Core\UtilsView $oUtilsView */
html_entity_decode( $oUtilsView = Registry::getUtilsView();
$oManufacturer->getFieldData( Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME ) ?? ''
), $longdesc = $oManufacturer->d3GetLongdesc()->getRawValue() ?? '';
Field::T_RAW $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);
} }
} }
} }