From a47d69b2942c355f3820560a5664d9d294d9dee5 Mon Sep 17 00:00:00 2001 From: Daniel Seifert Date: Thu, 5 Dec 2024 12:15:33 +0100 Subject: [PATCH] parse manufacturer longdesc through Smarty --- .../Model/ManufacturerInfoList.php | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/Modules/Application/Model/ManufacturerInfoList.php b/Modules/Application/Model/ManufacturerInfoList.php index 21a8ad3..1191f0f 100644 --- a/Modules/Application/Model/ManufacturerInfoList.php +++ b/Modules/Application/Model/ManufacturerInfoList.php @@ -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); } } }