[Changed] extension of Config instead of ArticleDetails; [Fixed] wrong usage of modSetting getter
more general, global take
This commit is contained in:
bovenliggende
eb489933c9
commit
ef5f4039d0
@ -27,11 +27,11 @@ namespace D3\ManufacturerInformation\Modules\Application\Model{
|
||||
}
|
||||
}
|
||||
|
||||
namespace D3\ManufacturerInformation\Modules\Application\Component\Widgets{
|
||||
namespace D3\ManufacturerInformation\Modules\Core{
|
||||
|
||||
use OxidEsales\Eshop\Application\Component\Widget\ArticleDetails;
|
||||
use OxidEsales\Eshop\Core\Config;
|
||||
|
||||
class ArticleDetailsManufacturer_parent extends ArticleDetails
|
||||
class ManufacturerConfig_parent extends Config
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ class ManufacturerInfoList extends ManufacturerInfoList_parent
|
||||
{
|
||||
parent::addCategoryFields($oManufacturer);
|
||||
|
||||
if (Registry::getConfig()->getConfigParam('d3manufacturerinformation_showManufacturertextOnManufacturerPage')) {
|
||||
if (Registry::getConfig()->d3GetBoolModuleSettingByName('_showManufacturertextOnManufacturerPage')) {
|
||||
$oManufacturer->oxcategories__oxlongdesc = new Field(
|
||||
html_entity_decode(
|
||||
$oManufacturer->getFieldData(Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME) ?? ''
|
||||
|
@ -15,13 +15,13 @@
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace D3\ManufacturerInformation\Modules\Application\Component\Widgets;
|
||||
namespace D3\ManufacturerInformation\Modules\Core;
|
||||
|
||||
use D3\ManufacturerInformation\Application\Model\Constants;
|
||||
use OxidEsales\EshopCommunity\Core\Di\ContainerFacade;
|
||||
use OxidEsales\EshopCommunity\Internal\Framework\Module\Facade\ModuleSettingServiceInterface;
|
||||
|
||||
class ArticleDetailsManufacturer extends ArticleDetailsManufacturer_parent
|
||||
class ManufacturerConfig extends ManufacturerConfig_parent
|
||||
{
|
||||
/**
|
||||
* @param string $sName
|
@ -17,12 +17,12 @@ declare(strict_types=1);
|
||||
|
||||
use D3\ManufacturerInformation\Application\Controller\Admin\ManufacturerInfoLongdesc;
|
||||
use D3\ManufacturerInformation\Application\Model\Constants;
|
||||
use D3\ManufacturerInformation\Modules\Application\Component\Widgets\ArticleDetailsManufacturer;
|
||||
use D3\ManufacturerInformation\Modules\Application\Model\D3ManufacturerLongDesc;
|
||||
use D3\ManufacturerInformation\Modules\Application\Model\ManufacturerInfoList;
|
||||
use OxidEsales\Eshop\Application\Component\Widget\ArticleDetails as OEArticleDetails;
|
||||
use D3\ManufacturerInformation\Modules\Core\ManufacturerConfig;
|
||||
use OxidEsales\Eshop\Application\Model\Manufacturer as OEManufacturer;
|
||||
use OxidEsales\Eshop\Application\Model\ManufacturerList as OEManufacturerList;
|
||||
use OxidEsales\Eshop\Core\Config as OEConfig;
|
||||
|
||||
$sMetadataVersion = '2.1';
|
||||
$sModuleId = Constants::OXID_MODULE_ID;
|
||||
@ -50,7 +50,7 @@ $aModule = [
|
||||
'extend' => [
|
||||
OEManufacturer::class => D3ManufacturerLongDesc::class,
|
||||
OEManufacturerList::class => ManufacturerInfoList::class,
|
||||
OEArticleDetails::class => ArticleDetailsManufacturer::class,
|
||||
OEConfig::class => ManufacturerConfig::class,
|
||||
],
|
||||
'templates' => [
|
||||
'@' . Constants::OXID_MODULE_ID . '/admin/d3manufacturerlongdesc.tpl' => 'views/smarty/admin/d3manufacturerlongdesc.tpl',
|
||||
|
@ -7,7 +7,7 @@
|
||||
{% set sShopURL = config.getConfigParam('sShopURL') %}
|
||||
{% set description = oManufacturer.d3GetLongdesc() %}
|
||||
|
||||
{% if oManufacturer and oView.d3GetBoolModuleSettingByName('_showManufacturertextOnDetailsPage') and description|striptags|trim %}
|
||||
{% if oManufacturer and config.d3GetBoolModuleSettingByName('_showManufacturertextOnDetailsPage') and description|striptags|trim %}
|
||||
<div class="col-12 col-md-6">
|
||||
<div id="manufacturer-collapsible" class="h4" data-bs-target="#manufacturer" data-bs-toggle="collapse" role="button" aria-expanded="false" aria-controls="manufacturer">
|
||||
{{ translate({ ident: "D3_MANUFACTURERINFO_TAB" }) }}
|
||||
|
Laden…
x
Verwijs in nieuw issue
Block a user