[Added] Manufacturer-Extension

This commit is contained in:
MaxBuhe01 2024-10-27 12:02:05 +01:00
parent 9a85c74825
commit 783e1729ac
2 changed files with 52 additions and 0 deletions

21
IntelliSenseHelper.php Normal file
View File

@ -0,0 +1,21 @@
<?php
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
namespace D3\ManufacturerInformation\Modules\Application\Model{
use OxidEsales\Eshop\Application\Model\Manufacturer;
class D3ManufacturerLongDesc_parent extends Manufacturer {}
}

View File

@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace D3\ManufacturerInformation\Modules\Application\Model;
use D3\ManufacturerInformation\Application\Model\Constants;
use OxidEsales\Eshop\Application\Model\Manufacturer;
use OxidEsales\Eshop\Core\Registry;
class D3ManufacturerLongDesc extends D3ManufacturerLongDesc_parent
{
/**
* @param string $sValue
* @return void
*/
public function d3SetLongdesc(string $sValue) :bool
{
if ($this->getId() and $this->isLoaded()){
try {
$this->assign([Constants::D3_OXMANUFACTURERS_LONGDESC_FIELDNAME => $sValue]);
$this->save();
}catch (\Exception $exception){
Registry::getLogger()->error($exception->getMessage());
}
}
return true;
}
}