8
0

parse manufacturer longdesc through Smarty

Dieser Commit ist enthalten in:
Daniel Seifert 2024-12-05 12:15:33 +01:00 committet von MaxBuhe01
Ursprung b278f8a185
Commit 07224f9530

Datei anzeigen

@ -33,13 +33,23 @@ class ManufacturerInfoList extends ManufacturerInfoList_parent
{
parent::addCategoryFields($oManufacturer);
if (Registry::getConfig()->d3GetBoolModuleSettingByName('_showManufacturertextOnManufacturerPage')) {
$oManufacturer->oxcategories__oxlongdesc = new Field(
html_entity_decode(
$oManufacturer->getFieldData(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME) ?? ''
),
Field::T_RAW
);
if (Registry::getConfig()->getConfigParam('d3manufacturerinformation_showManufacturertextOnManufacturerPage')) {
/** @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);
}
}
}