Vergelijk commits

...

No commits in common. "master" and "rel_6_sourceguardian_PHP80" have entirely different histories.

566 gewijzigde bestanden met toevoegingen van 62680 en 8 verwijderingen

36
.php-cs-fixer.php Normal file
Bestand weergeven

@ -0,0 +1,36 @@
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
;
$header = <<<EOF
Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
For the full copyright and license information, please view
the LICENSE file that was distributed with this source code.
https://www.d3data.de
@copyright (C) D3 Data Development (Inh. Thomas Dartsch)
@author D3 Data Development - Daniel Seifert <info@shopmodule.com>
@link https://www.oxidmodule.com
EOF;
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PHP80Migration' => true,
'@PSR12' => true,
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
'location' => 'after_open',
'separate' => 'both',
],
'php_unit_test_class_requires_covers' => true,
'doctrine_annotation_indentation' => true,
])
->setFinder($finder)
;

Bestand weergeven

@ -0,0 +1,47 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\Ordermanager\Application\Model\Constants;
use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController;
use OxidEsales\Eshop\Application\Controller\Admin\AdminMall; // required for non fallback case
// @codeCoverageIgnoreStart
// fallback for non ee editions
if ( ! class_exists( '\\' . AdminMall::class ) ) {
class d3AdminMall extends AdminDetailsController
{
protected $_sThisTemplate = '@'. Constants::OXID_MODULE_ID .'/admin/d3_cfg_ordermanageritem_mall';
public function render(): string
{
parent::render();
return $this->_sThisTemplate;
}
public function assignToSubshops(): void
{
}
}
} else {
class d3AdminMall extends AdminMall
{
}
}
// @codeCoverageIgnoreEnd

Bestand weergeven

@ -0,0 +1,35 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_;
use D3\Ordermanager\Application\Controller\Admin\d3_cfg_ordermanageritem_list as itemList;
use D3\Ordermanager\Application\Controller\Admin\d3_cfg_ordermanageritem_main as itemMain;
class d3_cfg_ordermanageritem extends d3_cfg_mod_
{
public function render(): string
{
$this->addTplParam('sListClass', itemList::class);
$this->addTplParam('sMainClass', itemMain::class);
$this->_hasListItems = true;
return parent::render();
}
}

Bestand weergeven

@ -0,0 +1,376 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\DIContainerHandler\d3DicException;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ParameterNotFoundException;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\Ordermanager\Application\Model\Actions\d3ordermanager_action_interface as ActionModelInterface;
use D3\Ordermanager\Application\Model\Actions\d3ordermanager_actiongrouplist as ActionGroupList;
use D3\Ordermanager\Application\Model\Actions\d3ordermanager_actionlist as ActionList;
use D3\Ordermanager\Application\Model\Constants;
use D3\Ordermanager\Application\Model\d3ordermanager_pdfhandler as PdfHandler;
use D3\Ordermanager\Application\Model\d3ordermanager as Manager;
use D3\Ordermanager\Application\Model\d3ordermanager_vars as VariablesTrait;
use D3\Ordermanager\Application\Model\Exceptions\d3ordermanager_actionException;
use DateTime;
use Doctrine\DBAL\Exception as DBALException;
use Doctrine\DBAL\Driver\Exception as DBALDriverException;
use Doctrine\DBAL\Query\QueryBuilder;
use OxidEsales\Eshop\Application\Model\Order as Item;
use OxidEsales\Eshop\Application\Model\ContentList;
use OxidEsales\Eshop\Core\Config;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Language;
use OxidEsales\Eshop\Core\Model\ListModel;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\Request;
use OxidEsales\Eshop\Core\UtilsView;
class d3_cfg_ordermanageritem_action extends d3_cfg_ordermanageritem_settings
{
use VariablesTrait;
protected $_sThisTemplate = '@'. Constants::OXID_MODULE_ID .'/admin/d3_cfg_ordermanageritem_action';
protected $_sMenuSubItemTitle = 'd3mxordermanager_items';
protected $_sSavedId;
protected string $_sExportFieldDescMLIdent = 'D3_ORDERMANAGER_FIELDDESC';
protected string $_sExportFieldTitleBaseMLIdent = 'D3_ORDERMANAGER_FIELDTITLE_';
protected string $_sExportFieldLangMLIdent = 'D3_ORDERMANAGER_FIELDADD_LANG';
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3DicException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function save(): void
{
// @codeCoverageIgnoreStart
if (!defined('OXID_PHP_UNIT')) {
parent::save();
}
// @codeCoverageIgnoreEnd
$aMissingRequiredValues = [];
/** @var ActionModelInterface $oAction */
foreach ($this->getActionList() as $sId => $oAction) {
if ($this->getProfile()->getValue($oAction->getActiveSwitchParameter())) {
try {
$oAction->throwUnvalidConfigurationException();
} catch (d3ordermanager_actionException $e) {
unset($e);
$aMissingRequiredValues[] = $sId;
}
}
}
if ($aMissingRequiredValues !== []) {
$this->addTplParam('missingRequValuesActions', $aMissingRequiredValues);
}
}
/**
* @throws d3DicException
*/
public function getContentList(): ListModel
{
/** @var $oContentList ContentList */
$oContentList = d3GetOxidDIC()->get('d3ox.ordermanager.'.ContentList::class);
return $this->_getObjectList($oContentList);
}
/**
* @throws d3DicException
*/
public function d3GetConfig(): Config
{
/** @var Config $config */
$config = d3GetOxidDIC()->get('d3ox.ordermanager.'.Config::class);
return $config;
}
/**
* @throws d3DicException
*/
public function getItemFieldNames(): array
{
/** @var Item $item */
$item = d3GetOxidDIC()->get('d3ox.ordermanager.'. Item::class);
return $item->getFieldNames();
}
/**
* @throws d3DicException
*/
public function getProfile(): Manager
{
/** @var Manager $oProfile */
$oProfile = d3GetOxidDIC()->get(Manager::class);
$soxId = $this->getEditObjectId();
if ($soxId != "-1") {
// load object
$oProfile->loadInLang($this->_iEditLang, $soxId);
// load object in other languages
$oOtherLang = $oProfile->getAvailableInLangs();
if (!isset($oOtherLang[$this->_iEditLang])) {
$oProfile->loadInLang(key($oOtherLang), $soxId);
}
}
return $oProfile;
}
/**
* @throws d3DicException
*/
public function getExportExamplePath(): string
{
$oProfile = $this->getProfile();
/** @var Request $request */
$request = d3GetOxidDIC()->get('d3ox.ordermanager.'.Request::class);
$soxId = $request->getRequestEscapedParameter("oxid");
if (isset($soxId) && $soxId && $soxId != "-1") {
// load object
$oProfile->loadInLang($this->_iEditLang, $soxId);
$oProfile = $this->_d3LoadInOtherLang($oProfile, $soxId);
}
$aSearch = [(new DateTime())->setTimestamp($oProfile->getStartTime())->format('Y-m-d_H-i-s')];
/** @var Language $oLang */
$oLang = d3GetOxidDIC()->get('d3ox.ordermanager.'.Language::class);
$aReplace = [$oLang->translateString('D3_ORDERMANAGER_ACTION_DATEPLACEHOLDER')];
return str_replace($aSearch, $aReplace, $oProfile->getListExportFilePath());
}
/**
* @param $sFieldName
* @throws d3DicException
*/
public function getFieldNameDescription($sFieldName): string
{
if (($sFieldNameTitle = $this->getFieldNameTitle($sFieldName))) {
return sprintf(
$this->getLang()->translateString($this->_sExportFieldDescMLIdent),
$sFieldNameTitle,
$sFieldName
);
}
return $sFieldName;
}
/**
* @throws d3DicException
*/
public function getLang(): Language
{
/** @var Language $language */
$language = d3GetOxidDIC()->get('d3ox.ordermanager.'.Language::class);
return $language;
}
/**
* @param $sFieldName
* @throws d3DicException
*/
public function getFieldNameTitle($sFieldName): ?string
{
$sLangAdd = '';
$sPattern = "@(.*)([_]{1}([0-9]{1,3}))$@";
if (preg_match($sPattern, $sFieldName, $aMatches)) {
$sFieldMLIdent = $this->_sExportFieldTitleBaseMLIdent.strtoupper($aMatches[1]);
$aLangNames = $this->getLang()->getLanguageNames();
$sLangAdd = sprintf(
$this->getLang()->translateString($this->_sExportFieldLangMLIdent),
$aLangNames[$aMatches[3]]
);
} else {
$sFieldMLIdent = $this->_sExportFieldTitleBaseMLIdent.strtoupper($sFieldName);
}
$sFieldName = $this->getLang()->translateString($sFieldMLIdent);
if ($sFieldName != $sFieldMLIdent) {
return $sFieldName.$sLangAdd;
}
return null;
}
/**
* @throws d3DicException
*/
public function getPdfHandler(): PdfHandler
{
d3GetOxidDIC()->set(
PdfHandler::class.'.args.ordermanager',
$this->getProfile()
);
d3GetOxidDIC()->set(
PdfHandler::class.'.args.order',
d3GetOxidDIC()->get('d3ox.ordermanager.'. Item::class)
);
/** @var PdfHandler $pdfhandler */
$pdfhandler = d3GetOxidDIC()->get(PdfHandler::class);
return $pdfhandler;
}
/**
* @throws d3DicException
*/
public function canGenerateOxidPdf(): bool
{
return $this->getPdfHandler()->canGenerateOxidPdf();
}
/**
* @throws d3DicException
*/
public function canGeneratePdfDocuments(): bool
{
return $this->getPdfHandler()->canGeneratePdfDocuments();
}
/**
* @throws d3DicException
*/
public function getActionGroupList(): ActionGroupList
{
d3GetOxidDIC()->set(
ActionGroupList::class.'.args.ordermanager',
$this->getProfile()
);
d3GetOxidDIC()->set(
ActionGroupList::class.'.args.order',
d3GetOxidDIC()->get('d3ox.ordermanager.'. Item::class)
);
/** @var ActionGroupList $actiongroup */
$actiongroup = d3GetOxidDIC()->get(ActionGroupList::class);
return $actiongroup;
}
/**
* @throws d3DicException
*/
public function getActionListObject(): ActionList
{
d3GetOxidDIC()->set(
ActionList::class.'.args.ordermanager',
$this->getProfile()
);
d3GetOxidDIC()->set(
ActionList::class.'.args.order',
d3GetOxidDIC()->get('d3ox.ordermanager.'. Item::class)
);
/** @var ActionList $actionlist */
$actionlist = d3GetOxidDIC()->get(ActionList::class);
return $actionlist;
}
/**
* @throws d3DicException
*/
public function getGroupedActionList(): array
{
$oManager = $this->getProfile();
$oActionList = $this->getActionGroupList();
$oActionList->setGroups($oManager->getConfiguration()->getGroupedActionIdList());
return $oActionList->getGroupList();
}
/**
* @throws d3DicException
*/
public function getActionList(): array
{
$oManager = $this->getProfile();
$oActionList = $this->getActionListObject();
$oActionList->setActions($oManager->getConfiguration()->getActionIdList());
return $oActionList->getActionList();
}
protected function _d3LoadInOtherLang(Manager $oProfile, string $soxId): Manager
{
// load object in other languages
$oOtherLang = $oProfile->getAvailableInLangs();
if (!isset($oOtherLang[$this->_iEditLang])) {
$oProfile->loadInLang(key($oOtherLang), $soxId);
}
return $oProfile;
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws DBALDriverException
* @throws StandardException
* @throws d3DicException
* @throws d3ParameterNotFoundException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function markAsFinished(): void
{
$oProfile = $this->getProfile();
/** @var QueryBuilder $qb */
$qb = d3GetOxidDIC()->get('d3ox.modcfg.OxDbQueryBuilder');
$qb->select('count(*)')
->from(d3GetOxidDIC()->get('d3ox.ordermanager.'.Item::class)->getViewName());
$iAllCount = (int) $qb->execute()->fetchOne();
$iCount = $oProfile->markConcernedItemsAsFinished(true);
$oEx = oxNew(
StandardException::class,
sprintf(
Registry::getLang()->translateString('D3_ORDERMANAGER_ACTION_MARKASFINISHED_MESSAGE'),
$iCount,
$iAllCount
)
);
Registry::get(UtilsView::class)->addErrorToDisplay($oEx);
}
}

Bestand weergeven

@ -0,0 +1,38 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_list;
use D3\Ordermanager\Application\Model\Constants;
use D3\Ordermanager\Application\Model\d3ordermanager as Manager;
use D3\Ordermanager\Application\Model\d3ordermanagerlist as ManagerList;
class d3_cfg_ordermanageritem_list extends d3_cfg_mod_list
{
protected $_sListClass = Manager::class;
protected $_sListType = ManagerList::class;
protected $_blShowListItems = true;
protected $_sThisTemplate = '@'. Constants::OXID_MODULE_ID .'/admin/d3_cfg_ordermanageritem_list';
protected $_sMenuItemTitle = 'd3mxordermanager';
protected $_sMenuSubItemTitle = 'd3mxordermanager_items';
}

Bestand weergeven

@ -0,0 +1,125 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_main;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\Ordermanager\Application\Model\Constants;
use D3\Ordermanager\Application\Model\d3ordermanager as Manager;
use D3\Ordermanager\Application\Model\d3ordermanager_vars as VariablesTrait;
use Doctrine\DBAL\Exception as DBALException;
use OxidEsales\Eshop\Core\Config;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Request;
class d3_cfg_ordermanageritem_main extends d3_cfg_mod_main
{
use VariablesTrait;
protected $_sSavedId;
protected $_sSetModId = 'd3_ordermanager';
protected $_sModId = 'd3_ordermanager';
protected $_sMenuItemTitle = 'd3mxordermanager';
protected $_sMenuSubItemTitle = 'd3mxordermanager_items';
protected $_sThisTemplate = '@'. Constants::OXID_MODULE_ID .'/admin/d3_cfg_ordermanageritem_main';
protected $_blUseOwnOxid = true;
protected $_aNaviItems = [
'new' => [
'sScript' => 'top.oxid.admin.editThis( -1 );return false;',
'sTranslationId' => 'D3_TOOLTIPS_NEWORDERMANAGER',
],
];
protected $_sD3ObjectClass = Manager::class;
/**
* Loads article parameters and passes them to template engine, returns
* name of template file "article_main.tpl".
*
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function render(): string
{
$sRet = parent::render();
/** @var Config $config */
$config = d3GetOxidDIC()->get('d3ox.ordermanager.'.Config::class);
$this->addTplParam("blUseTimeCheck", $config->getConfigParam('blUseTimeCheck'));
return $sRet;
}
/**
* Sets default values for empty article (currently does nothing), returns
* array with parameters.
*
* @param array $aParams Parameters, to set default values
*/
public function addDefaultValues($aParams): array
{
$aParams = parent::addDefaultValues($aParams);
/** @var Manager $oManager */
$oManager = d3GetOxidDIC()->get(Manager::class);
$sFieldLongName = $oManager->d3GetFieldLongName('d3_cronjobid');
/** @var Request $request */
$request = d3GetOxidDIC()->get('d3ox.ordermanager.'.Request::class);
$aRequestParameter = $request->getRequestEscapedParameter("editval");
if (is_array($aRequestParameter) && isset($aRequestParameter[$sFieldLongName])) {
$aRequestParameter[$sFieldLongName] = $this->fixCronjobId($aRequestParameter[$sFieldLongName]);
if (isset($_POST['editval'])) {
$_POST['editval'] = $aRequestParameter;
} elseif (isset($_GET['editval'])) {
$_GET['editval'] = $aRequestParameter;
}
}
return $aParams;
}
/**
* @param $sId
*/
public function fixCronjobId($sId): string|array
{
$aSearch = [
' ',
];
$sReplace = '_';
return str_replace($aSearch, $sReplace, $sId);
}
}

Bestand weergeven

@ -0,0 +1,189 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\ModCfg\Application\Model\d3filesystem;
use D3\ModCfg\Application\Model\d3str;
use D3\ModCfg\Application\Model\Exception\wrongModIdException;
use D3\Ordermanager\Application\Model\Constants;
use D3\Ordermanager\Application\Model\d3ordermanager as Manager;
use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod;
use D3\Ordermanager\Application\Model\d3ordermanager_vars as VariablesTrait;
use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController;
use OxidEsales\Eshop\Application\Controller\Admin\AdminMall; // required for non fallback case
use OxidEsales\Eshop\Core\Language;
use OxidEsales\Eshop\Core\Request;
class d3_cfg_ordermanageritem_mall extends d3AdminMall
{
use VariablesTrait;
private string $_sModId = 'd3_ordermanager';
/**
* DB table having oxshopincl and oxshopexcl fields we are going to deal with
*/
protected $_sMallTable = "d3modprofile";
protected $_blUseOwnOxid = true;
protected $_sMenuItemTitle = 'd3mxordermanager';
protected $_sMenuSubItemTitle = 'd3tbclordermanager_items_mall';
protected $_sHelpLinkMLAdd;
protected $_aNaviItems = [
'new' => [
'sScript' => 'top.oxid.admin.editThis( -1 );return false;',
'sTranslationId' => 'D3_TOOLTIPS_NEWORDERMANAGER',
],
];
/**
* Class name of object to load
*/
protected $_sObjectClassName = Manager::class;
/**
* constructor.
*/
public function __construct()
{
d3GetOxidDIC()->getParameter($this->_DIC_Instance_Id . 'modcfgid') === $this->_sModId or
throw oxNew(wrongModIdException::class, $this->_sModId);
parent::__construct();
}
public function getProfile(): Manager
{
/** @var Manager $oManager */
$oManager = d3GetOxidDIC()->get($this->_sObjectClassName);
return $oManager;
}
public function render(): string
{
$oProfile = $this->getProfile();
/** @var Request $request */
$request = d3GetOxidDIC()->get('d3ox.ordermanager.'.Request::class);
$soxId = $request->getRequestEscapedParameter("oxid");
if ($this->_isSetOxid($soxId)) {
// load object
$oProfile->loadInLang($this->_iEditLang, $soxId);
$oProfile = $this->_d3LoadInOtherLang($oProfile, $soxId);
}
$this->addTplParam('edit', $oProfile);
return parent::render();
}
public function getUserMessages(): array
{
return [];
}
public function getLang(): Language
{
/** @var Language $lang */
$lang = d3GetOxidDIC()->get('d3ox.ordermanager.'.Language::class);
return $lang;
}
public function getHelpURL(): string
{
$sUrl = $this->d3GetSet()->getHelpURL();
/** @var d3str $oD3Str */
$oD3Str = d3GetOxidDIC()->get(d3str::class);
if ($this->_sHelpLinkMLAdd) {
$sUrl .= $oD3Str->unprefixedslashit($this->getLang()->translateString($this->_sHelpLinkMLAdd));
}
$oFS = d3GetOxidDIC()->get(d3filesystem::class);
$aFileName = $oFS->splitFilename($sUrl);
// has no extension
if (false == $aFileName['ext']) {
return $oD3Str->trailingslashit($sUrl);
}
return $sUrl;
}
/**
* return type can't be defined, because of unmockable d3_cfg_mod class, use stdClass in test
* @return d3_cfg_mod
*/
public function d3GetSet()
{
/** @var d3_cfg_mod $modcfg */
$modcfg = d3GetOxidDIC()->get('d3.ordermanager.modcfg');
return $modcfg;
}
/**
* exampleItem: array('new' => array(
* 'sScript' => 'top.oxid.admin.editThis( -1 );return false;',
* 'sTranslationId' => 'foo',
* )
*/
public function getNaviItems(): array
{
return $this->_aNaviItems;
}
public function d3GetMenuItemTitle(): string
{
return $this->_sMenuItemTitle;
}
public function d3GetMenuSubItemTitle(): string
{
return $this->_sMenuSubItemTitle;
}
/**
* @param $soxId
*/
protected function _isSetOxid($soxId): bool
{
return isset($soxId) && $soxId && $soxId != "-1";
}
/**
* @param $soxId
*
*/
protected function _d3LoadInOtherLang(Manager $oProfile, $soxId): Manager
{
// load object in other languages
$oOtherLang = $oProfile->getAvailableInLangs();
if (false == isset($oOtherLang[$this->_iEditLang])) {
$oProfile->loadInLang(key($oOtherLang), $soxId);
}
return $oProfile;
}
}

Bestand weergeven

@ -0,0 +1,376 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_main;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ParameterNotFoundException;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\Ordermanager\Application\Model\Actions\d3ordermanager_actionlist as ActionListModel;
use D3\Ordermanager\Application\Model\Constants;
use D3\Ordermanager\Application\Model\d3ordermanager as Manager;
use D3\Ordermanager\Application\Model\d3ordermanager_configurationcheck;
use D3\Ordermanager\Application\Model\d3ordermanager_vars as VariablesTrait;
use D3\Ordermanager\Application\Model\Exceptions\d3ActionRequirementInterface;
use D3\Ordermanager\Application\Model\Requirements\d3ordermanager_requirementlist as RequirementListModel;
use D3\Ordermanager\Application\Controller\Admin\d3_cfg_ordermanageritem_action as ItemActionController;
use D3\Ordermanager\Application\Controller\Admin\d3_cfg_ordermanageritem_requ as ItemRequirementController;
use Doctrine\DBAL\Exception as DBALException;
use OxidEsales\Eshop\Application\Model\Order as ItemModel;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Language;
use OxidEsales\Eshop\Core\Request;
use OxidEsales\Eshop\Core\UtilsView;
use ReflectionException;
class d3_cfg_ordermanageritem_overview extends d3_cfg_mod_main
{
use VariablesTrait;
protected $_sSetModId = 'd3_ordermanager';
protected $_sModId = 'd3_ordermanager';
protected $_sThisTemplate = '@'. Constants::OXID_MODULE_ID .'/admin/d3_cfg_ordermanageritem_overview';
protected $_sMenuItemTitle = 'd3mxordermanager';
protected $_sMenuSubItemTitle = 'd3mxordermanager_items';
protected $_blUseOwnOxid = true;
protected $_aNaviItems = [
'new' => [
'sScript' => 'top.oxid.admin.editThis( -1 );return false;',
'sTranslationId' => 'D3_TOOLTIPS_NEWORDERMANAGER',
],
];
protected $_sD3ObjectClass = Manager::class;
protected $_sRequestData;
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
* @throws StandardException
*/
public function render(): string
{
try {
d3GetOxidDIC()->set(
d3ordermanager_configurationcheck::class.'.args.ordermanager',
$this->getManager()
);
/** @var d3ordermanager_configurationcheck $confCheck */
$confCheck = d3GetOxidDIC()->get(d3ordermanager_configurationcheck::class);
$confCheck->checkThrowingExceptions(d3ordermanager_configurationcheck::REQUIREMENTS_AND_ACTIONS);
} catch (d3ActionRequirementInterface $d3ActionRequirement) {
/** @var UtilsView $utilsView */
$utilsView = d3GetOxidDIC()->get('d3ox.ordermanager.'.UtilsView::class);
$utilsView->addErrorToDisplay($d3ActionRequirement);
}
return parent::render();
}
public function getActionAdminController(): ItemActionController
{
/** @var ItemActionController $action */
$action = d3GetOxidDIC()->get(ItemActionController::class);
return $action;
}
public function getRequirementAdminController(): ItemRequirementController
{
/** @var ItemRequirementController $requ */
$requ = d3GetOxidDIC()->get(ItemRequirementController::class);
return $requ;
}
/**
* @param $method
* @param $arguments
*
* @return mixed
*/
public function __call($method, $arguments)
{
$oActionView = $this->getActionAdminController();
if (method_exists($oActionView, $method)) {
return call_user_func_array([ $oActionView, $method], $arguments);
}
$oRequView = $this->getRequirementAdminController();
if (method_exists($oRequView, $method)) {
return call_user_func_array([ $oRequView, $method], $arguments);
}
return parent::__call($method, $arguments);
}
public function getRequirementListObject(Manager $oManager): RequirementListModel
{
d3GetOxidDIC()->set(
RequirementListModel::class.'.args.ordermanager',
$oManager
);
/** @var RequirementListModel $requList */
$requList = d3GetOxidDIC()->get(RequirementListModel::class);
return $requList;
}
public function getRequirementList(): array
{
/** @var Manager $oManager */
$oManager = $this->getProfile();
$oRequList = $this->getRequirementListObject($oManager);
$oRequList->setRequirements($oManager->getConfiguration()->getRequirementIdList());
return $oRequList->getRequirementList();
}
public function getActionListObject(Manager $oManager): ActionListModel
{
d3GetOxidDIC()->set(
ActionListModel::class.'.args.ordermanager',
$oManager
);
d3GetOxidDIC()->set(
ActionListModel::class.'.args.order',
d3GetOxidDIC()->get('d3ox.ordermanager.'.ItemModel::class)
);
/** @var ActionListModel $actionlist */
$actionlist = d3GetOxidDIC()->get(ActionListModel::class);
return $actionlist;
}
public function getActionList(): array
{
/** @var Manager $oManager */
$oManager = $this->getProfile();
$oActionList = $this->getActionListObject($oManager);
$oActionList->setActions($oManager->getConfiguration()->getActionIdList());
return $oActionList->getActionList();
}
public function isEditMode(): bool
{
return false;
}
public function setRequestData(): void
{
/** @var Request $request */
$request = d3GetOxidDIC()->get('d3ox.ordermanager.'.Request::class);
$this->_sRequestData = $request->getRequestEscapedParameter('sRequestData');
}
protected function _getRequestData(): string
{
return $this->_sRequestData;
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws d3ParameterNotFoundException
*/
public function getToFinishedCount(): int
{
/** @var Request $request */
$request = d3GetOxidDIC()->get('d3ox.ordermanager.'.Request::class);
$requestCount = $request->getRequestEscapedParameter('toFinishedCount');
if ($this->canRequestData(__FUNCTION__)) {
/** @var Manager $oProfile */
$oProfile = $this->getProfile();
return $oProfile->getListGenerator()->getConcernedItemCount();
}
if ($this->canUseRequestData($requestCount)) {
return (int) $requestCount;
}
return 0;
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws ReflectionException
* @throws d3ParameterNotFoundException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function getFinishedCount(): int
{
/** @var Request $request */
$request = d3GetOxidDIC()->get('d3ox.ordermanager.'.Request::class);
$requestCount = $request->getRequestEscapedParameter('finishedCount');
if ($this->canRequestData(__FUNCTION__)) {
/** @var Manager $oProfile */
$oProfile = $this->getProfile();
return $oProfile->getListGenerator()->getFinishedItemCount();
}
if ($this->canUseRequestData($requestCount)) {
return (int) $requestCount;
}
return 0;
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws d3ParameterNotFoundException
*/
public function getFinishedMonthCount(): int
{
/** @var Request $request */
$request = d3GetOxidDIC()->get('d3ox.ordermanager.'.Request::class);
$requestCount = $request->getRequestEscapedParameter('finishedMonthCount');
if ($this->canRequestData(__FUNCTION__)) {
/** @var Manager $oProfile */
$oProfile = $this->getProfile();
return $oProfile->getListGenerator()->getFinishedMonthItemCount();
}
if ($this->canUseRequestData($requestCount)) {
return (int) $requestCount;
}
return 0;
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws d3ParameterNotFoundException
*/
public function getNotFinishedCount(): int
{
/** @var Request $request */
$request = d3GetOxidDIC()->get('d3ox.ordermanager.'.Request::class);
$requestCount = $request->getRequestEscapedParameter('notFinishedCount');
if ($this->canRequestData(__FUNCTION__)) {
/** @var Manager $oProfile */
$oProfile = $this->getProfile();
return $oProfile->getListGenerator()->getNotFinishedItemCount();
}
if ($this->canUseRequestData($requestCount)) {
return (int) $requestCount;
}
return 0;
}
/**
* @param $sFunctionName
*
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function canRequestData($sFunctionName): bool
{
if (!$this->getDataOnDemand()) {
return true;
}
return $this->_getRequestData() == $sFunctionName;
}
/**
* @param $requestCount
*
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function canUseRequestData($requestCount): bool
{
return $this->getDataOnDemand()
&& isset($requestCount) && false !== $requestCount;
}
/**
* @throws DatabaseConnectionException
* @throws DBALException
* @throws DatabaseErrorException
*/
public function getDataOnDemand(): bool
{
return (bool) $this->d3GetSet()->getValue('blCalcStatOnDemand');
}
/**
* @param $sRequestName
* @param $sFunctionName
*/
public function hasRequestedData($sRequestName, $sFunctionName): bool
{
/** @var Request $request */
$request = d3GetOxidDIC()->get('d3ox.ordermanager.'.Request::class);
$iRequestCount = (string) $request->getRequestEscapedParameter($sRequestName);
return (bool) strlen($iRequestCount) || $this->_getRequestData() == $sFunctionName;
}
public function getManager(): Manager
{
/** @var Manager $manager */
$manager = d3GetOxidDIC()->get(Manager::class);
$manager->load($this->getEditObjectId());
return $manager;
}
public function getLang(): Language
{
/** @var Language $lang */
$lang = d3GetOxidDIC()->get('d3ox.ordermanager.'.Language::class);
return $lang;
}
/**
* @param $sManagerId
*/
public function getManagerTitle(string $sManagerId): string
{
$oManager = $this->getManager();
if ($oManager->load($sManagerId)) {
return $oManager->getFieldData('oxtitle');
}
return $this->getLang()->translateString('D3_ORDERMANAGER_REQU_OTHERJOB_UNKNOWNJOBID').' "'.$sManagerId.'"';
}
}

Bestand weergeven

@ -0,0 +1,165 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\Ordermanager\Application\Model\Constants;
use D3\Ordermanager\Application\Model\d3ordermanager as Manager;
use D3\Ordermanager\Application\Model\d3ordermanagerlist as ManagerList;
use D3\Ordermanager\Application\Model\d3ordermanager_vars as VariablesTrait;
use D3\Ordermanager\Application\Model\Exceptions\d3ordermanager_requirementException;
use D3\Ordermanager\Application\Model\Requirements\d3ordermanager_requirement_interface as RequirementModelInterface;
use D3\Ordermanager\Application\Model\Requirements\d3ordermanager_requirementgrouplist as RequirementGroupListModel;
use D3\Ordermanager\Application\Model\Requirements\d3ordermanager_requirementlist as RequirementListModel;
use OxidEsales\Eshop\Application\Model\DeliverySetList;
use OxidEsales\Eshop\Application\Model\PaymentList;
use OxidEsales\Eshop\Application\Model\CountryList;
use OxidEsales\Eshop\Core\Language;
use OxidEsales\Eshop\Core\Model\ListModel;
class d3_cfg_ordermanageritem_requ extends d3_cfg_ordermanageritem_settings
{
use VariablesTrait;
protected $_sThisTemplate = '@'. Constants::OXID_MODULE_ID .'/admin/d3_cfg_ordermanageritem_requ';
protected $_sMenuSubItemTitle = 'd3mxordermanager_items';
public function save(): void
{
// @codeCoverageIgnoreStart
if (!defined('OXID_PHP_UNIT')) {
parent::save();
}
// @codeCoverageIgnoreEnd
$aMissingRequiredValues = [];
/** @var RequirementModelInterface $oRequirement */
foreach ($this->getRequirementList() as $sId => $oRequirement) {
if ($this->getProfile()->getValue($oRequirement->getActiveSwitchParameter())) {
try {
$oRequirement->throwUnvalidConfigurationException();
} catch (d3ordermanager_requirementException $e) {
unset($e);
$aMissingRequiredValues[] = $sId;
}
}
}
if ($aMissingRequiredValues !== []) {
$this->addTplParam('missingRequValuesActions', $aMissingRequiredValues);
}
}
public function getPaymentList(): ListModel
{
/** @var PaymentList $oPaymentList */
$oPaymentList = d3GetOxidDIC()->get('d3ox.ordermanager.'.PaymentList::class);
return $this->_getObjectList($oPaymentList, null, 'oxdesc ASC');
}
public function getDeliverySetList(): DeliverySetList
{
/** @var DeliverySetList $oDeliverySetList */
$oDeliverySetList = d3GetOxidDIC()->get('d3ox.ordermanager.'.DeliverySetList::class);
/** @var DeliverySetList $list */
$list = $this->_getObjectList($oDeliverySetList, null, 'oxtitle ASC');
return $list;
}
public function getCountryList(): ListModel
{
/** @var CountryList $oCountryList */
$oCountryList = d3GetOxidDIC()->get('d3ox.ordermanager.'.CountryList::class);
return $this->_getObjectList($oCountryList, null, 'oxtitle ASC');
}
public function getJobList(): ManagerList
{
$sCurrentId = $this->getViewDataElement('edit')->getId();
/** @var $oManagerList ManagerList */
$oManagerList = d3GetOxidDIC()->get(ManagerList::class);
$oManagerList->setCustomSorting('oxsort ASC');
$oManagerList->getList();
$oManagerList->offsetUnset($sCurrentId);
return $oManagerList;
}
public function getLanguageList(): array
{
$oLang = d3GetOxidDIC()->get('d3ox.ordermanager.'.Language::class);
return $oLang->getLanguageArray();
}
/**
* Sets default values for empty article (currently does nothing), returns
* array with parameters.
*
* @param array $aParams Parameters, to set default values
*/
public function addDefaultValues($aParams): array
{
return $aParams;
}
public function getRequirementGroupList(Manager $oManager): RequirementGroupListModel
{
d3GetOxidDIC()->set(
RequirementGroupListModel::class.'.args.ordermanager',
$oManager
);
/** @var RequirementGroupListModel $requGroupModel */
$requGroupModel = d3GetOxidDIC()->get(RequirementGroupListModel::class);
return $requGroupModel;
}
public function getRequirementListObject(Manager $oManager): RequirementListModel
{
d3GetOxidDIC()->set(
RequirementListModel::class.'.args.ordermanager',
$oManager
);
/** @var RequirementListModel $requListModel */
$requListModel = d3GetOxidDIC()->get(RequirementListModel::class);
return $requListModel;
}
public function getGroupedRequirementList(): array
{
/** @var Manager $oManager */
$oManager = $this->getProfile();
$oRequList = $this->getRequirementGroupList($oManager);
$oRequList->setGroups($oManager->getConfiguration()->getGroupedRequirementIdList());
return $oRequList->getGroupList();
}
public function getRequirementList(): array
{
/** @var Manager $oManager */
$oManager = $this->getProfile();
$oRequList = $this->getRequirementListObject($oManager);
$oRequList->setRequirements($oManager->getConfiguration()->getRequirementIdList());
return $oRequList->getRequirementList();
}
}

Bestand weergeven

@ -0,0 +1,157 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\ModCfg\Application\Model\Exception\wrongModIdException;
use D3\Ordermanager\Application\Model\d3ordermanager as Manager;
use D3\Ordermanager\Application\Model\d3ordermanager_vars as VariablesTrait;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_main;
use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod;
use Doctrine\DBAL\Exception as DBALException;
use Doctrine\DBAL\Query\QueryBuilder;
use OxidEsales\Eshop\Core\Config;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Language;
use OxidEsales\Eshop\Core\Model\ListModel;
use OxidEsales\Eshop\Core\Model\MultiLanguageModel;
use OxidEsales\EshopCommunity\Internal\Container\ContainerFactory;
use OxidEsales\EshopCommunity\Internal\Framework\Database\QueryBuilderFactoryInterface;
use Psr\Container\ContainerInterface;
class d3_cfg_ordermanageritem_settings extends d3_cfg_mod_main
{
use VariablesTrait;
protected $_sModId = 'd3_ordermanager';
protected $_sMenuItemTitle = 'd3mxordermanager';
protected $_blUseOwnOxid = true;
protected $_aNaviItems = [
'new' => [
'sScript' => 'top.oxid.admin.editThis( -1 );return false;',
'sTranslationId' => 'D3_TOOLTIPS_NEWORDERMANAGER',
],
];
protected $_sD3ObjectClass = Manager::class;
/**
* constructor.
*/
public function __construct()
{
d3GetOxidDIC()->getParameter($this->_DIC_Instance_Id . 'modcfgid') === $this->_sModId or
throw oxNew(wrongModIdException::class, $this->_sModId);
parent::__construct();
}
public function getItemFolders(): array
{
/** @var Config $config */
$config = d3GetOxidDIC()->get($this->_DIC_OxInstance_Id.Config::class);
return $config->getConfigParam('aOrderfolder');
}
public function getGroupsList(): ListModel
{
/** @var $oGroupsList ListModel */
$oGroupsList = d3GetOxidDIC()->get($this->_DIC_OxInstance_Id.ListModel::class);
$oGroupsList->init('oxgroups');
return $this->_getObjectList($oGroupsList, null, 'oxtitle ASC');
}
public function getDIContainer(): ContainerInterface
{
return ContainerFactory::getInstance()->getContainer();
}
/**
* @param null|string $sWhere
* @param null|string $sOrderBy
*
*/
protected function _getObjectList(ListModel $oObjectList, $sWhere = null, $sOrderBy = null): ListModel
{
startProfile(__METHOD__);
/** @var Language $oLang */
$oLang = d3GetOxidDIC()->get($this->_DIC_OxInstance_Id.Language::class);
/** @var MultiLanguageModel $oObject */
$oObject = $oObjectList->getBaseObject();
if ($oObject->isMultilang()) {
$oObject->setLanguage($oLang->getTplLanguage());
}
$sFieldList = $oObject->getSelectFields();
/** @var queryBuilder $qb */
$qb = $this->getDIContainer()->get(QueryBuilderFactoryInterface::class)->create();
$qb->select($sFieldList)
->from($oObject->getViewName());
if ($sWhere) {
$qb->add('where', $sWhere);
}
if ($sOrderBy) {
$qb->add('orderBy', $sOrderBy);
}
$oObjectList->selectString($qb->getSQL(), $qb->getParameters());
stopProfile(__METHOD__);
return $oObjectList;
}
public function isEditMode(): bool
{
return true;
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function getRestrictionMessage(): string
{
/** @var Language $oLang */
$oLang = d3GetOxidDIC()->get($this->_DIC_OxInstance_Id.Language::class);
/** @var d3_cfg_mod $oModCfg */
$oModCfg = d3GetOxidDIC()->get($this->_DIC_Instance_Id.'modcfg');
return sprintf(
$oLang->translateString('D3_ORDERMANAGER_ERROR_RESTRICTIONS'),
$oModCfg->getLicenseConfigData('sEditionId', 'unknown')
);
}
}

Bestand weergeven

@ -0,0 +1,142 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\Ordermanager\Application\Model\Constants;
use D3\Ordermanager\Application\Model\d3ordermanager as Manager;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_main;
use D3\Ordermanager\Application\Model\d3ordermanager_conf as ConfModel;
use D3\Ordermanager\Application\Model\d3ordermanager_vars as VariablesTrait;
use Doctrine\DBAL\Exception as DBALException;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Request;
class d3_cfg_ordermanageritem_trigger extends d3_cfg_mod_main
{
use VariablesTrait;
protected $_sSavedId;
protected $_sSetModId = 'd3_ordermanager';
protected $_sModId = 'd3_ordermanager';
protected $_sMenuItemTitle = 'd3mxordermanager';
protected $_sMenuSubItemTitle = 'd3mxordermanager_items';
protected $_sThisTemplate = '@'. Constants::OXID_MODULE_ID .'/admin/d3_cfg_ordermanageritem_trigger';
protected $_blUseOwnOxid = true;
protected $_aNaviItems = [
'new' => [
'sScript' => 'top.oxid.admin.editThis( -1 );return false;',
'sTranslationId' => 'D3_TOOLTIPS_NEWORDERMANAGER',
],
];
protected $_sD3ObjectClass = Manager::class;
/**
* Sets default values for empty article (currently does nothing), returns
* array with parameters.
*
* @param array $aParams Parameters, to set default values
*/
public function addDefaultValues($aParams): array
{
$aParams = parent::addDefaultValues($aParams);
/** @var Manager $oManager */
$oManager = d3GetOxidDIC()->get(Manager::class);
$sFieldLongName = $oManager->d3GetFieldLongName('d3_cronjobid');
/** @var Request $request */
$request = d3GetOxidDIC()->get($this->_DIC_OxInstance_Id.Request::class);
$aRequestParameter = $request->getRequestEscapedParameter("editval");
if (is_array($aRequestParameter) && isset($aRequestParameter[$sFieldLongName])) {
$aRequestParameter[$sFieldLongName] = $this->fixCronjobId($aRequestParameter[$sFieldLongName]);
if (isset($_POST['editval'])) {
$_POST['editval'] = $aRequestParameter;
} elseif (isset($_GET['editval'])) {
$_GET['editval'] = $aRequestParameter;
}
}
return $aParams;
}
/**
* @param $sId
*/
public function fixCronjobId($sId): string|array
{
$aSearch = [
' ',
];
$sReplace = '_';
return str_replace($aSearch, $sReplace, $sId);
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function triggersAreAllowed(): bool
{
if ($this->d3GetSet()->isDemo()) {
return true;
}
return in_array(
true,
array_map([$this->d3GetSet(),'getLicenseConfigData'], [ConfModel::SERIAL_BIT_STANDARD_EDITION])
);
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function scriptsAreAllowed(): bool
{
if ($this->d3GetSet()->isDemo()) {
return true;
}
return in_array(
true,
array_map([$this->d3GetSet(),'getLicenseConfigData'], [ConfModel::SERIAL_BIT_PREMIUM_EDITION])
);
}
}

Bestand weergeven

@ -0,0 +1,36 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\Log\d3_cfg_log;
class d3_cfg_ordermanagerlog extends d3_cfg_log
{
protected $_sModId = 'd3_ordermanager';
public function d3getAdditionalUrlParams(): string
{
$sRet = parent::d3getAdditionalUrlParams();
if ($this->_sModId) {
$sRet .= '&sD3ModId='.$this->_sModId;
}
return $sRet;
}
}

Bestand weergeven

@ -0,0 +1,25 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\Log\d3_cfg_log_list;
class d3_cfg_ordermanagerlog_list extends d3_cfg_log_list
{
protected $_sModId = 'd3_ordermanager';
}

Bestand weergeven

@ -0,0 +1,35 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\Ordermanager\Application\Controller\Admin\d3_cfg_ordermanagerset_list as setListController;
use D3\Ordermanager\Application\Controller\Admin\d3_cfg_ordermanagerset_main as setMainController;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_;
class d3_cfg_ordermanagerset extends d3_cfg_mod_
{
public function render(): string
{
$this->addTplParam('sListClass', setListController::class);
$this->addTplParam('sMainClass', setMainController::class);
$this->_hasListItems = false;
return parent::render();
}
}

Bestand weergeven

@ -0,0 +1,31 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_licence;
class d3_cfg_ordermanagerset_licence extends d3_cfg_mod_licence
{
protected $_sModId = 'd3_ordermanager';
protected $_hasNewsletterForm = false;
protected $_sMenuItemTitle = 'd3mxordermanager';
protected $_sMenuSubItemTitle = 'd3mxordermanager_settings';
}

Bestand weergeven

@ -0,0 +1,45 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_list;
class d3_cfg_ordermanagerset_list extends d3_cfg_mod_list
{
// enables language depended configuration
protected $_blD3ShowLangSwitch = false;
protected $_sMenuItemTitle = 'd3mxordermanager';
protected $_sMenuSubItemTitle = 'd3mxordermanager_settings';
/**
* @return null
*/
public function render()
{
$sRet = parent::render();
// default page number 1
$this->addTplParam('oxid', 1);
$this->addTplParam("default_edit", "d3_cfg_ordermanagerset_main");
$this->addTplParam("updatemain", $this->_blUpdateMain);
return $sRet;
}
}

Bestand weergeven

@ -0,0 +1,220 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\ModCfg\Application\Controller\Admin\d3_cfg_mod_main;
use D3\ModCfg\Application\Model\d3str;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\ModCfg\Application\Model\Exception\wrongModIdException;
use D3\ModCfg\Application\Model\Filegenerator\d3filegeneratorcronsh;
use D3\ModCfg\Application\Model\Shopcompatibility\d3ShopCompatibilityAdapterHandler;
use D3\Ordermanager\Application\Model\Constants;
use D3\Ordermanager\Application\Model\d3ordermanager as Manager;
use D3\Ordermanager\Application\Model\d3ordermanager_vars as VariablesTrait;
use Doctrine\DBAL\Exception as DBALException;
use OxidEsales\Eshop\Application\Model\Shop;
use OxidEsales\Eshop\Core\Config;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Language;
use OxidEsales\Eshop\Core\Request;
use OxidEsales\Eshop\Core\ViewConfig;
class d3_cfg_ordermanagerset_main extends d3_cfg_mod_main
{
use VariablesTrait;
protected $_sModId = 'd3_ordermanager';
protected $_sThisTemplate = '@'. Constants::OXID_MODULE_ID .'/admin/d3_cfg_ordermanagerset_main';
protected $_blHasDebugSwitch = true;
protected $_sDebugHelpTextIdent = 'D3_ORDERMANAGER_SET_DEBUG_DESC';
protected $_sMenuItemTitle = 'd3mxordermanager';
protected $_sMenuSubItemTitle = 'd3mxordermanager_settings';
/**
* constructor.
*/
public function __construct()
{
d3GetOxidDIC()->getParameter($this->_DIC_Instance_Id . 'modcfgid') === $this->_sModId or
throw oxNew(wrongModIdException::class, $this->_sModId);
parent::__construct();
}
public function getManager(): Manager
{
/** @var Manager $manager */
$manager = d3GetOxidDIC()->get(Manager::class);
return $manager;
}
/**
* get basic cronjob access password; for cases only, if no password is set
*/
public function getBaseCronPW(): string
{
return $this->getManager()->getBaseCronPW();
}
public function getViewConfig(): ViewConfig
{
// don't use DIC because of circular reference
if ($this->_oViewConf === null) {
$this->_oViewConf = oxNew(ViewConfig::class);
}
return $this->_oViewConf;
}
public function getD3Str(): d3str
{
/** @var d3str $d3str */
$d3str = d3GetOxidDIC()->get(d3str::class);
return $d3str;
}
/**
* @param bool|int $iCronJobId
*/
public function getCronPath($iCronJobId = false): string
{
$sScriptPath = VENDOR_PATH.'bin/d3_ordermanager_cron';
$aParameters = [
'task' => 'run',
'shp' => $this->getViewConfig()->getActiveShopId(),
];
if ($iCronJobId !== false) {
$aParameters['cjid'] = $iCronJobId;
}
return 'php ' . $sScriptPath." ".implode(' ', $aParameters);
}
/**
* @throws DatabaseConnectionException
*/
public function getAvailableCronjobIds(): array
{
return $this->getManager()->getAvailableCronjobIds();
}
/**
* @param bool|array $aCJID
*/
public function getCJIDDesc(array $aCJID): string
{
/** @var Language $oLang */
$oLang = d3GetOxidDIC()->get($this->_DIC_OxInstance_Id.Language::class);
if ($aCJID['count'] == 1) {
return sprintf(
$oLang->translateString('D3_ORDERMANAGER_SET_CRON_JOBID', null, true),
$aCJID['id'],
$aCJID['count']
);
}
return sprintf(
$oLang->translateString('D3_ORDERMANAGER_SET_CRON_JOBSID', null, true),
$aCJID['id'],
$aCJID['count']
);
}
/**
* @param bool|int $iCronJobId
*/
public function getCronTimestampVarName($iCronJobId = false): string
{
$sVarName = "sCronExecTimestamp";
if ($iCronJobId !== false) {
$sVarName .= $iCronJobId;
}
return $sVarName;
}
public function getFileGeneratorCronSh(): d3filegeneratorcronsh
{
/** @var d3filegeneratorcronsh $filegenerator */
$filegenerator = d3GetOxidDIC()->get(d3filegeneratorcronsh::class);
return $filegenerator;
}
public function getCronProviderList(): array
{
return $this->getFileGeneratorCronSh()->getContentList();
}
public function getCompatibilityAdapterHandler(): d3ShopCompatibilityAdapterHandler
{
/** @var d3ShopCompatibilityAdapterHandler $compatiblityHandler */
$compatiblityHandler = d3GetOxidDIC()->get(d3ShopCompatibilityAdapterHandler::class);
return $compatiblityHandler;
}
public function d3GetActiveShop(): Shop
{
/** @var Config $config */
$config = d3GetOxidDIC()->get($this->_DIC_OxInstance_Id.Config::class);
return $config->getActiveShop();
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function generateCronShFile(): void
{
$sScriptPath = VENDOR_PATH.'bin/d3_ordermanager_cron';
/** @var Request $request */
$request = d3GetOxidDIC()->get($this->_DIC_OxInstance_Id.Request::class);
$sCronId = $request->getRequestEscapedParameter('cronid');
$oShop = $this->d3GetActiveShop();
$aParameters = [
0 => 'run',
1 => $oShop->getId(),
2 => $sCronId,
];
$oD3ShGenerator = $this->getFileGeneratorCronSh();
$oD3ShGenerator->setContentType($request->getRequestEscapedParameter('crontype'));
$oD3ShGenerator->setScriptPath($sScriptPath);
$oD3ShGenerator->setSortedParameterList($aParameters);
$oD3ShGenerator->startDownload('d3ordermanager_'.$oShop->getId()."_".$sCronId.".sh");
}
}

Bestand weergeven

@ -0,0 +1,482 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller\Admin;
use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod;
use D3\ModCfg\Application\Model\d3filesystem;
use D3\ModCfg\Application\Model\d3str;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ParameterNotFoundException;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\ModCfg\Application\Model\Exception\wrongModIdException;
use D3\ModCfg\Application\Model\Log\d3log;
use D3\Ordermanager\Application\Model\Constants;
use D3\Ordermanager\Application\Model\d3ordermanager as Manager;
use D3\Ordermanager\Application\Model\d3ordermanager_configurationcheck;
use D3\Ordermanager\Application\Model\d3ordermanager_execute as ManagerExecuteModel;
use D3\Ordermanager\Application\Model\d3ordermanager_toorderassignment as ToItemAssignmentModel;
use D3\Ordermanager\Application\Model\d3ordermanagerlist;
use D3\Ordermanager\Application\Model\d3ordermanagerlist as ManagerListModel;
use D3\Ordermanager\Application\Model\d3ordermanager_vars as VariablesTrait;
use D3\Ordermanager\Application\Model\Exceptions\d3ActionRequirementInterface;
use D3\Ordermanager\Application\Model\Exceptions\d3ordermanager_templaterendererExceptionInterface;
use Doctrine\DBAL\Exception as DBALException;
use OxidEsales\Eshop\Application\Controller\Admin\AdminDetailsController;
use OxidEsales\Eshop\Application\Model\Order as ItemModel;
use OxidEsales\Eshop\Core\Config;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Field;
use OxidEsales\Eshop\Core\Language;
use OxidEsales\Eshop\Core\Model\BaseModel;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\Request;
use OxidEsales\Eshop\Core\Session;
use OxidEsales\Eshop\Core\UtilsView;
use OxidEsales\Twig\Resolver\TemplateChain\TemplateType\NonTemplateFilenameException;
class d3_ordermanager_jobs extends AdminDetailsController
{
use VariablesTrait;
private string $_sModId = 'd3_ordermanager';
/** @var ManagerListModel */
protected $_aJobList;
protected $_sHelpLinkMLAdd;
public $_sThisTemplate = '@' . Constants::OXID_MODULE_ID . '/admin/d3_ordermanager_jobs';
/**
* constructor.
*/
public function __construct()
{
// prevent the use of the global currency setting instead of the order setting
unset($_GET['cur']);
d3GetOxidDIC()->getParameter($this->_DIC_Instance_Id . 'modcfgid') === $this->_sModId or
throw oxNew(wrongModIdException::class, $this->_sModId);
parent::__construct();
}
public function getItemObject(): ItemModel
{
/** @var ItemModel $item */
$item = d3GetOxidDIC()->get('d3ox.ordermanager.'.ItemModel::class);
return $item;
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function render(): string
{
$tpl = parent::render();
$soxId = $this->getEditObjectId();
$this->addTplParam("oxid", $soxId);
if ($soxId != "-1") {
$oItem = $this->getItemObject();
$oItem->load($soxId);
$this->addTplParam("edit", $oItem);
}
/** @var Session $session */
$session = d3GetOxidDIC()->get($this->_DIC_OxInstance_Id.Session::class);
$sJobFolder = $session->getVariable('d3FolderSelect');
$this->addTplParam("jobfolder", $sJobFolder);
$this->_aJobList = $this->_d3GetManuallyManagerJobs($sJobFolder);
return $tpl;
}
public function d3GetSession(): Session
{
/** @var Session $session */
$session = d3GetOxidDIC()->get('d3ox.ordermanager.'.Session::class);
return $session;
}
public function changeFolder(): void
{
/** @var Request $request */
$request = d3GetOxidDIC()->get($this->_DIC_OxInstance_Id.Request::class);
$this->d3GetSession()->setVariable(
'd3FolderSelect',
$request->getRequestEscapedParameter('jobfolder')
);
}
public function getManagerList(): ManagerListModel
{
/** @var ManagerListModel $managerList */
$managerList = d3GetOxidDIC()->get(ManagerListModel::class);
return $managerList;
}
public function d3GetManagerJobs(): ManagerListModel
{
$oManagerList = $this->getManagerList();
$oManagerList->getList();
return $oManagerList;
}
/**
* @param $sFolderId
*
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
protected function _d3GetManuallyManagerJobs($sFolderId): ManagerListModel
{
try {
$oManagerList = $this->getManagerList();
$oList = $oManagerList->d3GetManuallyManagerJobsByFolder($sFolderId);
/** @var Manager $oManager */
foreach ($oList as $sId => $oManager) {
$oManagerExecute = $this->getManagerExecute($oManager);
if (!$oManager->getValue('sManuallyExecMeetCondition')) {
continue;
}
if (false != $oManagerExecute->orderMeetsConditions($this->getEditObjectId())) {
continue;
}
$oList->offsetUnset($sId);
}
return $oList;
} catch (d3ActionRequirementInterface $d3ActionRequirement) {
/** @var UtilsView $utilsView */
$utilsView = d3GetOxidDIC()->get('d3ox.ordermanager.'.UtilsView::class);
$utilsView->addErrorToDisplay($d3ActionRequirement);
}
/** @var d3ordermanagerlist $managerList */
$managerList = d3GetOxidDIC()->get(ManagerListModel::class);
return $managerList;
}
public function d3GetJobList(): array
{
return $this->_aJobList->getArray();
}
public function getManager(): Manager
{
/** @var Manager $manager */
$manager = d3GetOxidDIC()->get(Manager::class);
return $manager;
}
public function getManagerExecute(Manager $oManager): ManagerExecuteModel
{
d3GetOxidDIC()->set(
ManagerExecuteModel::class.'.args.ordermanager',
$oManager
);
/** @var ManagerExecuteModel $managerExecute */
$managerExecute = d3GetOxidDIC()->get(ManagerExecuteModel::class);
return $managerExecute;
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function d3execordermanager(): void
{
try {
/** @var Request $request */
$request = d3GetOxidDIC()->get($this->_DIC_OxInstance_Id . Request::class);
$oManager = $this->getManager();
$oManager->load($request->getRequestEscapedParameter('ordermanagerid'));
$oManagerExec = $this->getManagerExecute($oManager);
$this->checkForConfigurationException($oManager);
if (false == $oManager->getValue('sManuallyExecMeetCondition') ||
$oManagerExec->orderMeetsConditions($this->getEditObjectId())
) {
$oManagerExec->exec4order($this->getEditObjectId());
$oManagerExec->finishJobExecution();
}
} catch (d3ActionRequirementInterface | d3ordermanager_templaterendererExceptionInterface $oEx) {
// @codeCoverageIgnoreStart
if (!defined('OXID_PHP_UNIT')) {
$logger = Registry::getLogger();
$logger->error($oEx);
}
// @codeCoverageIgnoreEnd
d3GetOxidDIC()->get('d3.ordermanager.log')->alert(
self::class,
__FUNCTION__,
__LINE__,
"execution error",
$oEx->getMessage()
);
/** @var UtilsView $utilsView */
$utilsView = d3GetOxidDIC()->get('d3ox.ordermanager.'.UtilsView::class);
$utilsView->addErrorToDisplay($oEx);
} finally {
$oConfig = d3GetOxidDIC()->get('d3ox.ordermanager.'.Config::class);
$oConfig->setAdminMode(true);
}
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function d3ExecChangedOrderManager(): void
{
try {
/** @var Request $request */
$request = d3GetOxidDIC()->get($this->_DIC_OxInstance_Id.Request::class);
$oManager = $this->getManager();
$oManager->load($request->getRequestEscapedParameter('ordermanagerid'));
$oManager->setEditedValues($request->getRequestEscapedParameter('aContent'));
$oManagerExec = $this->getManagerExecute($oManager);
$this->checkForConfigurationException($oManager);
if (false == $oManager->getValue('sManuallyExecMeetCondition') ||
$oManagerExec->orderMeetsConditions($this->getEditObjectId())
) {
$oManagerExec->exec4order($this->getEditObjectId());
$oManagerExec->finishJobExecution();
}
} catch (d3ActionRequirementInterface|d3ordermanager_templaterendererExceptionInterface $e) {
// @codeCoverageIgnoreStart
if (!defined('OXID_PHP_UNIT')) {
$logger = Registry::getLogger();
$logger->error($e);
}
// @codeCoverageIgnoreEnd
d3GetOxidDIC()->get('d3.ordermanager.log')->alert(
self::class,
__FUNCTION__,
__LINE__,
"execution error",
$e->getMessage()
);
/** @var UtilsView $utilsView */
$utilsView = d3GetOxidDIC()->get('d3ox.ordermanager.'.UtilsView::class);
$utilsView->addErrorToDisplay($e);
} finally {
$oConfig = d3GetOxidDIC()->get('d3ox.ordermanager.'.Config::class);
$oConfig->setAdminMode(true);
}
}
public function getOrderManagerAssignment(Manager $oManager): ToItemAssignmentModel
{
d3GetOxidDIC()->set(
ToItemAssignmentModel::class.'.args.ordermanager',
$oManager
);
/** @var ToItemAssignmentModel $managerAssignment */
$managerAssignment = d3GetOxidDIC()->get(ToItemAssignmentModel::class);
return $managerAssignment;
}
/**
* @throws d3ParameterNotFoundException
*/
public function d3resetOrderManagerAssignment(): void
{
/** @var Request $request */
$request = d3GetOxidDIC()->get($this->_DIC_OxInstance_Id.Request::class);
$oManager = $this->getManager();
$oAssignment = $this->getOrderManagerAssignment($oManager);
$oAssignment->resetAssignment(
$request->getRequestEscapedParameter('ordermanagerid'),
$this->getEditObjectId()
);
}
/**
* @return mixed
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
*/
public function getFolderList()
{
$oManager = $this->getManager();
return $oManager->d3getSelectableFolderList();
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
public function execChangedContents(): void
{
try {
/** @var Request $request */
$request = d3GetOxidDIC()->get($this->_DIC_OxInstance_Id.Request::class);
$sItemId = $this->getEditObjectId();
$oManager = $this->getManager();
$oManager->load($request->getRequestEscapedParameter('ordermanagerid'));
// check configuration exceptions
$this->checkForConfigurationException($oManager);
$contents = $oManager->getEditableContent($sItemId);
$this->addTplParam('aMailContent', $contents);
$field = oxNew(Field::class);
$field->setValue($contents['html'] ?? '');
$object = oxNew(BaseModel::class);
$object->__set(
'aContent[mail][html]',
$field
);
$this->addTplParam("htmleditor", $this->generateTextEditor("95%", 180, $object, "aContent[mail][html]", "list.tpl.css"));
$this->addTplParam('sAction', __FUNCTION__);
$this->addTplParam('oManager', $oManager);
} catch (d3ActionRequirementInterface | d3ordermanager_templaterendererExceptionInterface | NonTemplateFilenameException $oEx) {
// @codeCoverageIgnoreStart
if (! defined('OXID_PHP_UNIT')) {
$logger = Registry::getLogger();
$logger->error($oEx->getMessage());
}
// @codeCoverageIgnoreEnd
$this->getManager()->d3getLog()->log(d3log::ALERT, self::class, __FUNCTION__, __LINE__, "stop execution because configuration error", $oEx->getMessage());
/** @var UtilsView $utilsView */
$utilsView = d3GetOxidDIC()->get('d3ox.ordermanager.' . UtilsView::class);
$utilsView->addErrorToDisplay($oEx);
} finally {
$oConfig = d3GetOxidDIC()->get('d3ox.ordermanager.'.Config::class);
$oConfig->setAdminMode(true);
}
}
public function getUserMessages(): array
{
return [];
}
public function getLang(): Language
{
/** @var Language $language */
$language = d3GetOxidDIC()->get('d3ox.ordermanager.'.Language::class);
return $language;
}
public function getHelpURL(): string
{
$sUrl = $this->d3GetSet()->getHelpURL();
/** @var d3str $oD3Str */
$oD3Str = d3GetOxidDIC()->get(d3str::class);
if ($this->_sHelpLinkMLAdd) {
$sUrl .= $oD3Str->unprefixedslashit($this->getLang()->translateString($this->_sHelpLinkMLAdd));
}
/** @var d3filesystem $oFS */
$oFS = d3GetOxidDIC()->get(d3filesystem::class);
$aFileName = $oFS->splitFilename($sUrl);
// has no extension
if (false == $aFileName['ext']) {
return $oD3Str->trailingslashit($sUrl);
}
return $sUrl;
}
/**
* return type can't be defined, because of unmockable d3_cfg_mod class, use stdClass in test
* @return d3_cfg_mod
*/
public function d3GetSet()
{
/** @var d3_cfg_mod $modCfg */
$modCfg = d3GetOxidDIC()->get('d3.ordermanager.modcfg');
return $modCfg;
}
public function getLink(): string
{
return '';
}
/**
* @throws d3ActionRequirementInterface
*/
protected function checkForConfigurationException(Manager $oManager): void
{
d3GetOxidDIC()->set(d3ordermanager_configurationcheck::class.'.args.ordermanager', $oManager);
/** @var d3ordermanager_configurationcheck $confCheck */
$confCheck = d3GetOxidDIC()->get(d3ordermanager_configurationcheck::class);
$confCheck->checkThrowingExceptions($oManager->getValue('sManuallyExecMeetCondition') ?
d3ordermanager_configurationcheck::REQUIREMENTS_AND_ACTIONS :
d3ordermanager_configurationcheck::ACTIONS_ONLY);
}
}

Bestand weergeven

@ -0,0 +1,333 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Controller;
use Assert\Assert;
use Assert\InvalidArgumentException;
use D3\ModCfg\Application\Model\Configuration\d3_cfg_mod;
use D3\ModCfg\Application\Model\Exception\d3_cfg_mod_exception;
use D3\ModCfg\Application\Model\Exception\d3ShopCompatibilityAdapterException;
use D3\ModCfg\Application\Model\Exception\wrongModIdException;
use D3\ModCfg\Application\Model\Log\d3LogInterface;
use D3\Ordermanager\Application\Model\d3ordermanager as Manager;
use D3\Ordermanager\Application\Model\d3ordermanager_execute as ManagerExecuteModel;
use D3\Ordermanager\Application\Model\d3ordermanager_vars as VariablesTrait;
use D3\Ordermanager\Application\Model\d3ordermanagerlist as ManagerList;
use D3\Ordermanager\Application\Model\Exceptions\d3ordermanager_cronUnavailableException as cronUnavailableException;
use DateTime;
use Doctrine\DBAL\Exception as DBALException;
use OxidEsales\Eshop\Core\Base;
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Exception\DatabaseException;
use OxidEsales\Eshop\Core\Exception\StandardException;
use OxidEsales\Eshop\Core\Language;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\Request;
use RuntimeException;
class d3ordermanager_response extends Base
{
use VariablesTrait;
private string $_sModId = 'd3_ordermanager';
/**
* constructor.
*/
public function __construct()
{
$this->isCLI() or throw new RuntimeException('controller must called via command line interface');
d3GetOxidDIC()->getParameter($this->_DIC_Instance_Id . 'modcfgid') === $this->_sModId or
throw oxNew(wrongModIdException::class, $this->_sModId);
parent::__construct();
}
public function isCLI(): bool
{
return str_starts_with(PHP_SAPI, 'cli');
}
public function initCli(): void
{
startProfile(__METHOD__);
$this->_startExecution();
stopProfile(__METHOD__);
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws DatabaseException
* @throws StandardException
* @throws cronUnavailableException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
protected function _startExecution()
{
startProfile(__METHOD__);
$iStartTime = microtime(true);
/** @var d3LogInterface $oLog */
$oLog = d3GetOxidDIC()->get('d3.ordermanager.log');
$oLog->info(self::class, __FUNCTION__, __LINE__, "start cron", "");
$this->_checkUnavailableCronjob();
$this->_getSet()->setValue($this->_getCronTimestampVarName(), (new DateTime())->format('Y-m-d H:i:s'));
$this->_getSet()->saveNoLicenseRefresh();
$this->_startJobs();
$iExecTime = microtime(true) - $iStartTime;
$oLog->info(
self::class,
__FUNCTION__,
__LINE__,
"end cron",
'execution time: '.$iExecTime." sec"
);
stopProfile(__METHOD__);
}
public function getManagerList(): ManagerList
{
/** @var ManagerList $managerList */
$managerList = d3GetOxidDIC()->get(ManagerList::class);
return $managerList;
}
public function getManagerExecute(Manager $oManager): ManagerExecuteModel
{
d3GetOxidDIC()->set(
ManagerExecuteModel::class.'.args.ordermanager',
$oManager
);
/** @var ManagerExecuteModel $manager_execute */
$manager_execute = d3GetOxidDIC()->get(ManagerExecuteModel::class);
return $manager_execute;
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws DatabaseException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
*/
protected function _startJobs()
{
startProfile(__METHOD__);
$oManagerList = $this->getManagerList();
$oManagerList->setCronJobId($this->_getCronJobIdParameter());
$oManagerList->setCustomSorting('oxsort ASC');
$oManagerList->getList();
$oHandleManager = $this->getManager();
$oHandleManagerExec = $this->getManagerExecute($oHandleManager);
// disable admin mode for using active check
$blOldAdminMode = self::$_blIsAdmin;
self::$_blIsAdmin = false;
/** @var d3LogInterface $oLog */
$oLog = d3GetOxidDIC()->get('d3.ordermanager.log');
$oLog->info(
self::class,
__FUNCTION__,
__LINE__,
'manager count',
$oManagerList->count()
);
/** @var $oManager Manager */
foreach ($oManagerList->getList() as $oManager) {
$oHandleManager = $this->getManager();
$oHandleManager->setLanguage(Registry::getLang()->getTplLanguage());
$oHandleManager->load($oManager->getId());
$oHandleManagerExec->setManager($oHandleManager);
self::$_blIsAdmin = $blOldAdminMode;
$oHandleManagerExec->startJobExecution();
self::$_blIsAdmin = false;
}
self::$_blIsAdmin = $blOldAdminMode;
$oHandleManagerExec->finishJobExecution();
stopProfile(__METHOD__);
}
public function getManager(): Manager
{
/** @var Manager $manager */
$manager = d3GetOxidDIC()->get(Manager::class);
return $manager;
}
protected function _checkAccessKey(): bool
{
$sSetCronPassword = $this->_getSet()->getValue('sCronPassword');
/** @var Request $request */
$request = d3GetOxidDIC()->get('d3ox.ordermanager.'.Request::class);
$sGetAccessKey = $request->getRequestEscapedParameter("key");
$sRegisteredAccessKey = $sSetCronPassword ?: $this->getManager()->getBaseCronPW();
return $this->hasValidAccessKey($sRegisteredAccessKey, $sGetAccessKey);
}
/**
* return type can't be defined, because of unmockable d3_cfg_mod class, use stdClass in test
* @return d3_cfg_mod
*/
protected function _getSet()
{
/** @var d3_cfg_mod $modcfg */
$modcfg = d3GetOxidDIC()->get('d3.ordermanager.modcfg');
return $modcfg;
}
public function isBrowserCall(): bool
{
return (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR']) ||
(isset($_SERVER['HTTP_USER_AGENT']) && $_SERVER['HTTP_USER_AGENT']);
}
/**
* @param $sRegisteredAccessKey
* @param $sGetAccessKey
*/
protected function hasValidAccessKey($sRegisteredAccessKey, $sGetAccessKey): bool
{
if (false == $this->isBrowserCall()) {
return true;
}
return $sRegisteredAccessKey == $sGetAccessKey;
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
* @throws DatabaseErrorException
* @throws StandardException
* @throws d3ShopCompatibilityAdapterException
* @throws d3_cfg_mod_exception
* @throws cronUnavailableException
*/
protected function _checkUnavailableCronjob()
{
$this->_getSet()->isActive() or throw $this->getCronUnavailableException(
$this->getLang()->translateString('D3_ORDERMANAGER_EXC_CRON_MODULEDISABLED')
);
$this->_checkAccessKey() or throw $this->getCronUnavailableException(
$this->getLang()->translateString('D3_ORDERMANAGER_EXC_CRON_WRONGPASSWORD')
);
$this->_getSet()->getValue('blCronActive') or throw $this->getCronUnavailableException(
$this->getLang()->translateString('D3_ORDERMANAGER_EXC_CRON_UNAVAILABLE')
);
}
/**
* @param $sMessage
*/
public function getCronUnavailableException($sMessage): cronUnavailableException
{
return oxNew(cronUnavailableException::class, $sMessage);
}
/**
* @return string|int
*/
protected function _getCronJobIdParameter()
{
/** @var Request $request */
$request = d3GetOxidDIC()->get('d3ox.ordermanager.'.Request::class);
$iCjId = $request->getRequestEscapedParameter('cjid');
try {
Assert::that( $iCjId )->notBlank();
} catch (InvalidArgumentException) {
return 0;
}
return $iCjId;
}
protected function _getCronTimestampVarName(): string
{
return "sCronExecTimestamp".$this->_getCronJobIdParameter();
}
public function getLastExecDate(): string
{
return (string) $this->_getSet()->getValue($this->_getCronTimestampVarName());
}
/**
* @throws DBALException
* @throws DatabaseConnectionException
*/
public function getLastExecDateInfo(): array
{
$sCronJobId = $this->_getCronJobIdParameter();
$taskCount = current(
array_filter(
$this->getManager()->getAvailableCronjobIds(),
static fn ($entry): bool => $entry['id'] == $sCronJobId
)
)['count'];
return [
sprintf(
$this->getLang()->translateString('D3_GENERAL_ORDERMANAGER_TASKCOUNT_CRONID'),
$sCronJobId,
$taskCount
),
sprintf(
$this->getLang()->translateString('D3_GENERAL_ORDERMANAGER_LASTEXEC_CRONID'),
$sCronJobId,
$this->getLastExecDate()
),
];
}
public function getLang(): Language
{
/** @var Language $lang */
$lang = d3GetOxidDIC()->get('d3ox.ordermanager.'.Language::class);
return $lang;
}
}

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand weergeven

@ -0,0 +1,23 @@
<?php
/**
* Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* https://www.d3data.de
*
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
* @link https://www.oxidmodule.com
*/
declare(strict_types=1);
namespace D3\Ordermanager\Application\Model;
class Constants
{
public const OXID_MODULE_ID = 'd3ordermanager';
}

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand weergeven

@ -0,0 +1,2 @@
<?php ?><?php /** This Software is the property of D³ Data Development and is protected by copyright law - it is NOT Freeware. Any unauthorized use of this software without a valid license key is a violation of the license agreement and will be prosecuted by civil and criminal law. Inhaber: Thomas Dartsch Alle Rechte vorbehalten @package Auftragsmanager @version 6.1.0.0 SourceGuardian (11.12.2024) @author Daniel Seifert support@shopmodule.com @copyright (C) 2024, D3 Data Development @see https://www.d3data.de */ ?><?php
if(!function_exists('sg_load')){$__v=phpversion();$__x=explode('.',$__v);$__v2=$__x[0].'.'.(int)$__x[1];$__u=strtolower(substr(php_uname(),0,3));$__ts=(@constant('PHP_ZTS') || @constant('ZEND_THREAD_SAFE')?'ts':'');$__f=$__f0='ixed.'.$__v2.$__ts.'.'.$__u;$__ff=$__ff0='ixed.'.$__v2.'.'.(int)$__x[2].$__ts.'.'.$__u;$__ed=@ini_get('extension_dir');$__e=$__e0=@realpath($__ed);$__dl=function_exists('dl') && function_exists('file_exists') && @ini_get('enable_dl') && !@ini_get('safe_mode');if($__dl && $__e && version_compare($__v,'5.2.5','<') && function_exists('getcwd') && function_exists('dirname')){$__d=$__d0=getcwd();if(@$__d[1]==':') {$__d=str_replace('\\','/',substr($__d,2));$__e=str_replace('\\','/',substr($__e,2));}$__e.=($__h=str_repeat('/..',substr_count($__e,'/')));$__f='/ixed/'.$__f0;$__ff='/ixed/'.$__ff0;while(!file_exists($__e.$__d.$__ff) && !file_exists($__e.$__d.$__f) && strlen($__d)>1){$__d=dirname($__d);}if(file_exists($__e.$__d.$__ff)) dl($__h.$__d.$__ff); else if(file_exists($__e.$__d.$__f)) dl($__h.$__d.$__f);}if(!function_exists('sg_load') && $__dl && $__e0){if(file_exists($__e0.'/'.$__ff0)) dl($__ff0); else if(file_exists($__e0.'/'.$__f0)) dl($__f0);}if(!function_exists('sg_load')){$__ixedurl='https://www.sourceguardian.com/loaders/download.php?php_v='.urlencode($__v).'&php_ts='.($__ts?'1':'0').'&php_is='.@constant('PHP_INT_SIZE').'&os_s='.urlencode(php_uname('s')).'&os_r='.urlencode(php_uname('r')).'&os_m='.urlencode(php_uname('m'));$__sapi=php_sapi_name();if(!$__e0) $__e0=$__ed;if(function_exists('php_ini_loaded_file')) $__ini=php_ini_loaded_file(); else $__ini='php.ini';if((substr($__sapi,0,3)=='cgi')||($__sapi=='cli')||($__sapi=='embed')){$__msg="\nPHP script '".__FILE__."' is protected by SourceGuardian and requires a SourceGuardian loader '".$__f0."' to be installed.\n\n1) Download the required loader '".$__f0."' from the SourceGuardian site: ".$__ixedurl."\n2) Install the loader to ";if(isset($__d0)){$__msg.=$__d0.DIRECTORY_SEPARATOR.'ixed';}else{$__msg.=$__e0;if(!$__dl){$__msg.="\n3) Edit ".$__ini." and add 'extension=".$__f0."' directive";}}$__msg.="\n\n";}else{$__msg="<html><body>PHP script '".__FILE__."' is protected by <a href=\"https://www.sourceguardian.com/\">SourceGuardian</a> and requires a SourceGuardian loader '".$__f0."' to be installed.<br><br>1) <a href=\"".$__ixedurl."\" target=\"_blank\">Click here</a> to download the required '".$__f0."' loader from the SourceGuardian site<br>2) Install the loader to ";if(isset($__d0)){$__msg.=$__d0.DIRECTORY_SEPARATOR.'ixed';}else{$__msg.=$__e0;if(!$__dl){$__msg.="<br>3) Edit ".$__ini." and add 'extension=".$__f0."' directive<br>4) Restart the web server";}}$__msg.="</body></html>";}die($__msg);exit();}}return sg_load('7A3737B3C7126DA0AAQAAAAhAAAABKgAAACABAAAAAAAAAD/QDb4Co+YgIVbw1sUzFxwtaQvcAPWv+hbSz+BExDFHRk6p2N9CZXNMv9+sbEOBEHkMxcueXP/QVn7Aa4KhFMaC0kUGtCh2xOTtVG7VjdnPWFyrWbY5EeKc4zeEvWzUv6nnzcNXAo5qRzgAy3dSkgF4z4dYOpULKvV64ZzWT6VuaODRRkrNHoVCC5QEjCSu6mMETa1o/uWaqnIMt0UYV65wOiEso7akc/XCAAAANgBAAC9d/igmwc4fQ8xanlSYB0nmpBhyBxCRDHISXHHVL9//l/Ufqeu+U9o4wZH5BXcLHNOyEIc8lRj/ZoCRNvUnAA/gZKENc+WpCYV9BCL2ytF/M2vW5S0JcpQfH7e7LWGgw+frCEalUK02AWiA9CgOhApF+Yp+SoU6C4rOeTHCToHPCsR6WVeIdkRaaGW9LOvleH88962P4CWy/vvi7pEZkMXKTwX643ykXrqGaVfIxVaqexGoz/scsWowi5vo34y8j3OQdOUWYIM39+ZtS8PbC3Tn7lsihHWFMZH570kuycYj9QEMPlLK7dH6eN+EDKpjTIkhb4scj3VmOtS0iW8QrJHu5VPQNEtQRenor+zklKFAFdrGkOe87If0wl0WwK+X5VixtZc7ehK8mmZwLC9s/rxh2rZvC1qbrnngpU1DKgDlqQdLYlq42JDOejGa4E9L/XCFxNLebBM248Petv0h7SoqRwI0E6ryaoG2EVLS8TiA78lmWpBhWSm8IZudnQNQEYRgkThotKmAEjeT6DIXUUBh1N0gNb0h6twclnj/g6ELnjP1xWNBEl4Z1NtgqJzCECmqx1VKB+Vk4FnIoRLJvecI+pPX191awehiltoUNzgoVQvtByZHN6AUQAAANgBAAAm1W89jJwTzMpAwIe/OAaIL1Zq5d8utEBoIk121NTLqyIZB7owgnjnuJ6xMvMPoq4v94uQESzzKsDGxRu3Vhu5DwsCYm4SXN18s1fvTz73B4LmMAEfSiYotlUN8Gv+EpuLbVvtQczVF3JLKutxeZg3U2QAkP6picQOnTTLjfpUDhhvCKGU8teJYTQPbvFI5KGGYNzXHUqx2oZ5noE2YWfvYfn9cuG6jOz5FWhg0pmWYIfyiCFj8w3mvHnGpY7fHzWKVLJBElss1LJkz14/QVxaOSVYS3TB9XvBnTebbb19b6O3FhKboL5CLuUOi3JVDAQ2ktopgjh7Gd+CMYG5s+/qFFmluI4KDrLMLeD9mQEfp484y9tvMcFAL1AuLKjy/SgIZb5Feu/Y3Hpyj7oIXeXAukWOxn0sF19dLqZ8Oc/addfLraybwbSrJtTB3IESregefTmp4iv/1Yz6YO31iasQzff+tZf6g88OvbGRHmaYiz9htrSWjNlYjtUBSG6pdxydrpaOpb5XV/R3t6sLKS9m9y6VogbMh+VmxAdCrbp3BBWTvdJTPcKioJ0Jf0Fdfe2PMc4XWTSXCvA9NBvBPHbIa3/RcSIfzM7Zapt0zELGzUXiFVjeq8YNUgAAANABAACSjytL9n+hX7EvyVn5VsVYPohlM3Cl6cH5nZ0zAntSzFIHa3F/Ic5E+PET4tVlrrqjPNijUIQcv6WxPM7dYVQo50R+TAgN50WG3CFhCtvAz7YMJZCE2fzaN16cDaDlrWkMT530/wCo+Vfmav9KNPW7VmnkDN/iuf8ppxpQOG7/o1EEfoNvG2bDgusus9KahMStPc3VmFUVutOEMZ+YjQtJthSKDOW5xrriB5hmilcnf9zJilsVA9DEs1ey8/BZ5GlLn2DlXXC7aXiyEZjlATj9f/X+aDi7BrFKZNTm1ux0HFMD95v5j2THCy27V2jX5AXXKJPr1wRbmZfWkuEXHX2RKv4s0Cz52tSEOkwXfyb9u+9YC0SMFT5hZVzGrGeRLiEv2Bd/py/hVosXGTxgRFkt9NR5L6qG2lco+TxxtuNBO3F9mJdtrHtbzBhkgZ1ydmXjA6PLyVT8zLZ6baa1JD5Tel2ugv/Kx7DHdtKyEM2MQPRotLNE7Oh7WZKkEJUT0EtqVeC2IfE9l5eF02FVnyZPwoCx4NDb9AnnSLBOeLBFPTOvjQRP7iUuTceR5t+u7N/AksvW8W+360/DPLw9F1mQVwZCQWmsDvOlKZDf1tyNLQAAAAA=');

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand weergeven

@ -0,0 +1,2 @@
<?php ?><?php /** This Software is the property of D³ Data Development and is protected by copyright law - it is NOT Freeware. Any unauthorized use of this software without a valid license key is a violation of the license agreement and will be prosecuted by civil and criminal law. Inhaber: Thomas Dartsch Alle Rechte vorbehalten @package Auftragsmanager @version 6.1.0.0 SourceGuardian (11.12.2024) @author Daniel Seifert support@shopmodule.com @copyright (C) 2024, D3 Data Development @see https://www.d3data.de */ ?><?php
if(!function_exists('sg_load')){$__v=phpversion();$__x=explode('.',$__v);$__v2=$__x[0].'.'.(int)$__x[1];$__u=strtolower(substr(php_uname(),0,3));$__ts=(@constant('PHP_ZTS') || @constant('ZEND_THREAD_SAFE')?'ts':'');$__f=$__f0='ixed.'.$__v2.$__ts.'.'.$__u;$__ff=$__ff0='ixed.'.$__v2.'.'.(int)$__x[2].$__ts.'.'.$__u;$__ed=@ini_get('extension_dir');$__e=$__e0=@realpath($__ed);$__dl=function_exists('dl') && function_exists('file_exists') && @ini_get('enable_dl') && !@ini_get('safe_mode');if($__dl && $__e && version_compare($__v,'5.2.5','<') && function_exists('getcwd') && function_exists('dirname')){$__d=$__d0=getcwd();if(@$__d[1]==':') {$__d=str_replace('\\','/',substr($__d,2));$__e=str_replace('\\','/',substr($__e,2));}$__e.=($__h=str_repeat('/..',substr_count($__e,'/')));$__f='/ixed/'.$__f0;$__ff='/ixed/'.$__ff0;while(!file_exists($__e.$__d.$__ff) && !file_exists($__e.$__d.$__f) && strlen($__d)>1){$__d=dirname($__d);}if(file_exists($__e.$__d.$__ff)) dl($__h.$__d.$__ff); else if(file_exists($__e.$__d.$__f)) dl($__h.$__d.$__f);}if(!function_exists('sg_load') && $__dl && $__e0){if(file_exists($__e0.'/'.$__ff0)) dl($__ff0); else if(file_exists($__e0.'/'.$__f0)) dl($__f0);}if(!function_exists('sg_load')){$__ixedurl='https://www.sourceguardian.com/loaders/download.php?php_v='.urlencode($__v).'&php_ts='.($__ts?'1':'0').'&php_is='.@constant('PHP_INT_SIZE').'&os_s='.urlencode(php_uname('s')).'&os_r='.urlencode(php_uname('r')).'&os_m='.urlencode(php_uname('m'));$__sapi=php_sapi_name();if(!$__e0) $__e0=$__ed;if(function_exists('php_ini_loaded_file')) $__ini=php_ini_loaded_file(); else $__ini='php.ini';if((substr($__sapi,0,3)=='cgi')||($__sapi=='cli')||($__sapi=='embed')){$__msg="\nPHP script '".__FILE__."' is protected by SourceGuardian and requires a SourceGuardian loader '".$__f0."' to be installed.\n\n1) Download the required loader '".$__f0."' from the SourceGuardian site: ".$__ixedurl."\n2) Install the loader to ";if(isset($__d0)){$__msg.=$__d0.DIRECTORY_SEPARATOR.'ixed';}else{$__msg.=$__e0;if(!$__dl){$__msg.="\n3) Edit ".$__ini." and add 'extension=".$__f0."' directive";}}$__msg.="\n\n";}else{$__msg="<html><body>PHP script '".__FILE__."' is protected by <a href=\"https://www.sourceguardian.com/\">SourceGuardian</a> and requires a SourceGuardian loader '".$__f0."' to be installed.<br><br>1) <a href=\"".$__ixedurl."\" target=\"_blank\">Click here</a> to download the required '".$__f0."' loader from the SourceGuardian site<br>2) Install the loader to ";if(isset($__d0)){$__msg.=$__d0.DIRECTORY_SEPARATOR.'ixed';}else{$__msg.=$__e0;if(!$__dl){$__msg.="<br>3) Edit ".$__ini." and add 'extension=".$__f0."' directive<br>4) Restart the web server";}}$__msg.="</body></html>";}die($__msg);exit();}}return sg_load('7A3737B3C7126DA0AAQAAAAhAAAABKgAAACABAAAAAAAAAD/QDb4Co+YgIVbw1sUzFxwtaQvcAPWv+hbSz+BExDFHRk6p2N9CZXNMv9+sbEOBEHkMxcueXP/QVn7Aa4KhFMaC0kUGtCh2xOTtVG7VjdnPWFyrWbY5EeKc4zeEvWzUv6nnzcNXAo5qRzgAy3dSkgF4z4dYOpULKvV64ZzWT6VuaODRRkrNHoVCC5QEjCSu6mMETa1o/uWaqnIMt0UYV65wOiEso7akc/XCAAAAJgBAAAT4F4GhHs+MQ77kpf7iB2umdBQ0cPlnYfmuCwBYYs69HcvsVGWiirtdZ+bxqIeIV9dsxDh9ukfOuNGZSJcnnGZm2r9xdXJgWAxiSA0pZKeMEKQo8b5zYJ3oFpYVQ8crzF2vN98EIIjQZ8ReLv7xcWWDpWTqQIJ4u5lqPA44O2t8ov8Es+Q09m94xiKV+6D+9qkzAXzzZyBU5IFejcw2rYZdDQslXSKGRA+qnw/vGYJdrMsuKPsHw4TXtkyW3VSz5rukJY89PKBonWCzr2ZkI+F2YC21I32oWjHFuknGEKbNmM4sITBva2SGqVhPUb7UWMugj+63ql4fK5padWBvh75XF3AvSHoAK7JbU6iawbfqZ5e6dSjUS2MXOrkZbwHDvKUya8TJj4AXLb6SOQ0m4eHKvYK5BgDNLbW/LBKjwTnq4jI6VWcrZYJBvdoKTFn1FLps20MYZ9nz5ScZfqu8x0VGAR5RbpWbv8EfuCmNASPREwGQzqmdLDdT1xS0nEpWer94+ZCleeeZDjyHkECU+JAZqCOAHZgAvhRAAAAkAEAAHgLpTDYvqbAOWgFVyyf4Rba0rIgO4sQKk5V2eD39vieYHy+p3tpxiPZgTa0iDWf4fu9ZB5UQuGA271Hxv03nELTvh7a4vSXvPNQFUu8WsnPqQYid5mWmvpKJdY+t4LNw5896MrHbZdfPfsmZVQW0r1AROW1zWusaNwUu2imRZmCfwSQ+FkK0JeibwVVpqSvaTusL/s0mrXDAvIzv+deUn7IZLcvzQRszXm3dM+ONhDesusoupAiIXGwKbsjtRUELllEbvMd217A5UTFevitTCueUDOFjI9YdtRySNFqWQHnT5WH0ALW6bpIjfIO8xEqWfuZ+sO9GQiJIuIH8MvUW7bfxwMUfe9DkFM/Eyq4/TyQuq/VuFkR86wlzQ/Lt0XlKXvMuGB160JQfmvT2ohyymcSSBtw8G6IYb1ZoKxJ3dqAVekGMuqSqekj1AuYKwsxoOnKoCP8DOv2jNfpmT7hdLW0YbJI1GycyByEGx4yLagzr6y7WoOldElkvEE04zhHDy81jr2uGb07YN6odKnpptdSAAAAkAEAAMg31y8WRQ5E9iqRvABwCkD+2s9OrBtUx+W+TDZOgPiRPS8voMmeIGdj0GFdetkHPFceP0pzB/W6Dp6JILbugtNE7N9NqoyZJeMdOFqYI255YTVCvTJGDlGXdL9c+WomDXBQCS76sgtGe1lafxeHVcJE9LQtAYBySgC6pOuq9Vm5QChQMxjbCraQbHGS570fWHww/KRX2ccWLPoDWTorh6soav4n8gLuWAgTp03Rkilt8fF4JPccf7F0mVLY736wpNBhvZOgbxuY/shcVqxZsm6p3BZQ+sn/1CIWmAGWjPPNmGLVBQ+kIPNT5eGuxQDaH3H1PBu7jKEARkMtyy/C9UidiW6V9Oraq0Wi4n86VzkHb82wAVakRH+7F0QNcamfoX0i8WoeFMT3y/T5V3c92z1jjlQ2Y1OV8eFnE25ibyhu6PW9YxRW1+M9tZLdwx9tNWRDRRh3nXkMeduFtwtvrlaO9uRVtqbmn53yBPwLp2DVg2mCe4HoDeblQuMgyrldW2dQ0DvAm/rKJ3QUvpQM8HsAAAAA');

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand weergeven

@ -0,0 +1,2 @@
<?php ?><?php /** This Software is the property of D³ Data Development and is protected by copyright law - it is NOT Freeware. Any unauthorized use of this software without a valid license key is a violation of the license agreement and will be prosecuted by civil and criminal law. Inhaber: Thomas Dartsch Alle Rechte vorbehalten @package Auftragsmanager @version 6.1.0.0 SourceGuardian (11.12.2024) @author Daniel Seifert support@shopmodule.com @copyright (C) 2024, D3 Data Development @see https://www.d3data.de */ ?><?php
if(!function_exists('sg_load')){$__v=phpversion();$__x=explode('.',$__v);$__v2=$__x[0].'.'.(int)$__x[1];$__u=strtolower(substr(php_uname(),0,3));$__ts=(@constant('PHP_ZTS') || @constant('ZEND_THREAD_SAFE')?'ts':'');$__f=$__f0='ixed.'.$__v2.$__ts.'.'.$__u;$__ff=$__ff0='ixed.'.$__v2.'.'.(int)$__x[2].$__ts.'.'.$__u;$__ed=@ini_get('extension_dir');$__e=$__e0=@realpath($__ed);$__dl=function_exists('dl') && function_exists('file_exists') && @ini_get('enable_dl') && !@ini_get('safe_mode');if($__dl && $__e && version_compare($__v,'5.2.5','<') && function_exists('getcwd') && function_exists('dirname')){$__d=$__d0=getcwd();if(@$__d[1]==':') {$__d=str_replace('\\','/',substr($__d,2));$__e=str_replace('\\','/',substr($__e,2));}$__e.=($__h=str_repeat('/..',substr_count($__e,'/')));$__f='/ixed/'.$__f0;$__ff='/ixed/'.$__ff0;while(!file_exists($__e.$__d.$__ff) && !file_exists($__e.$__d.$__f) && strlen($__d)>1){$__d=dirname($__d);}if(file_exists($__e.$__d.$__ff)) dl($__h.$__d.$__ff); else if(file_exists($__e.$__d.$__f)) dl($__h.$__d.$__f);}if(!function_exists('sg_load') && $__dl && $__e0){if(file_exists($__e0.'/'.$__ff0)) dl($__ff0); else if(file_exists($__e0.'/'.$__f0)) dl($__f0);}if(!function_exists('sg_load')){$__ixedurl='https://www.sourceguardian.com/loaders/download.php?php_v='.urlencode($__v).'&php_ts='.($__ts?'1':'0').'&php_is='.@constant('PHP_INT_SIZE').'&os_s='.urlencode(php_uname('s')).'&os_r='.urlencode(php_uname('r')).'&os_m='.urlencode(php_uname('m'));$__sapi=php_sapi_name();if(!$__e0) $__e0=$__ed;if(function_exists('php_ini_loaded_file')) $__ini=php_ini_loaded_file(); else $__ini='php.ini';if((substr($__sapi,0,3)=='cgi')||($__sapi=='cli')||($__sapi=='embed')){$__msg="\nPHP script '".__FILE__."' is protected by SourceGuardian and requires a SourceGuardian loader '".$__f0."' to be installed.\n\n1) Download the required loader '".$__f0."' from the SourceGuardian site: ".$__ixedurl."\n2) Install the loader to ";if(isset($__d0)){$__msg.=$__d0.DIRECTORY_SEPARATOR.'ixed';}else{$__msg.=$__e0;if(!$__dl){$__msg.="\n3) Edit ".$__ini." and add 'extension=".$__f0."' directive";}}$__msg.="\n\n";}else{$__msg="<html><body>PHP script '".__FILE__."' is protected by <a href=\"https://www.sourceguardian.com/\">SourceGuardian</a> and requires a SourceGuardian loader '".$__f0."' to be installed.<br><br>1) <a href=\"".$__ixedurl."\" target=\"_blank\">Click here</a> to download the required '".$__f0."' loader from the SourceGuardian site<br>2) Install the loader to ";if(isset($__d0)){$__msg.=$__d0.DIRECTORY_SEPARATOR.'ixed';}else{$__msg.=$__e0;if(!$__dl){$__msg.="<br>3) Edit ".$__ini." and add 'extension=".$__f0."' directive<br>4) Restart the web server";}}$__msg.="</body></html>";}die($__msg);exit();}}return sg_load('7A3737B3C7126DA0AAQAAAAhAAAABKgAAACABAAAAAAAAAD/QDb4Co+YgIVbw1sUzFxwtaQvcAPWv+hbSz+BExDFHRk6p2N9CZXNMv9+sbEOBEHkMxcueXP/QVn7Aa4KhFMaC0kUGtCh2xOTtVG7VjdnPWFyrWbY5EeKc4zeEvWzUv6nnzcNXAo5qRzgAy3dSkgF4z4dYOpULKvV64ZzWT6VuaODRRkrNHoVCC5QEjCSu6mMETa1o/uWaqnIMt0UYV65wOiEso7akc/XCAAAAKABAABmspzQNPcjgWOGPSPGPvHsU8p4uqXV1bC6o0awy/eBoBMqNcrfooyecDQiEgOIUTojDipzKe32P76v4KNtiHwaYF82JqG4Bv7h5V/uNeK/p4Kd0JSLU1LC9ALDoNrikFbtTSZZtlxDOtzpKLTycGb/pYZLBd8kZ1sjIZroQ3TXgLai/JtWQy3P9uxcLEbCqjT4DuVgA+7STZhnguehdnbeIlMB3Lv22LttavwKvhsuj+16WKwFni63Hf3bnNIuNjqE38xmSnB7dUeIfZuYyrUxgNjps4qQa1cECdq575XXjMeEwW+zBLpgUxGsQn+6mSlSMVaenmG9H/7BJ2X0+k4RUjDvT9pR2uR07hW6XG7kxPTw59/yP3/xLgJ2bnFpsZoCEHRj7m/cl5lvBBxrNHiXf4dkWQCTEZXE5XZ/k/v/T0oYoAO2wmDsjaOhLtD6iyiQw6hX4PgyDRdQNEsdYI1ipReyQjwswq8mFDOc78fbHEEFvHhtze1oebTUsvtKG3ehKg04J0eP6KplffyRGf2TANPH9LkpSppZ8hB/9dXc21EAAACQAQAArqascBiGK0I4hqOTltD/MCG+XvmFYFsmnG94n+gnAjBZOP2stEV6JU4S2NYVDAvwFKf8W8IPxxAEX1NOGXejS295ym7D9mjcEZhsgyXQEViL/jcGs6ItK5HpfqR1KV3fTvw2xlLrY/h3hPgrXNgu50xiQEedVXqKQ3rsYBzCyYGhIfoyWMQbKGUO3P9RjZ0MQSUauoU1E5IdAJbWP9UAWo1QYdE9qzTWevYMMv0ttkOWhVRDTRxtmbxK9TBVBqk+8w4O2VYmm7uDK/ZfnDeoZB7AQTtNz4az8NEX6xqssVgQ2TzSrGGqhU0WhhHZWAUmKB4TxDRAb/HbiD/xdOT9FZz0ImLPLKKTurijMLwCe0C15JwZYAGH0jCpRajMiua7JNfI7ptivuvB2ffHRU/ukGf6csPEYfnh9HrOszFOsCEZMtWREsF3EMufjTdurviqpsuEdSQqm3PEBDLpD1gHki/WnYZfVIJPwQ6Xk2VlfB/s9cXE1eOK75UrmgE7flxIMH+ptsqWnhpOMIG3j7Ae4lIAAACQAQAAi/mLL2cuU5BVm4QNZKJd4ZWXlwbVv+3LguBPNmG2Vx3Ex/kh5rBt8DOxdeiKbG0tWkj/A3LyjipnjkVL/BZNim+SVOD/TspwQt4ybvK3ug7fapaK2XSl/b0Z0VVkbyfKpKehCERyeZRDXwXS9wbrdNtk5BDACP2DxaIBvlj6SqH1NxyO5TfixHcC7AI9lb/+C6cQhsXYIgiDq9z1lh/RgxEtTf3baS8HPyFh14jZecC02ADeuVzHE3MUX1+sZDgt4XGMmmfbJDUsLNMxKFwCLScONIvZeRKWM5qdq76STulJyO7t9D05l1qSOu/RhqT7hkh1wxIwJIdoL6U0u0mNN19vlkjHXrxHnbINId+782t5HWcZFv4XBrrs0w1t1dVJGpygFKFhD4QVB03iCWcxyaledpXASeAzH4ztFr5sEi/4mrbymTyEPz+GYWO/X+yfEBa+/3/fYDNQ1VFaeMD0M7OAhaKUNnL62YU1htlm4WVi/rlQVl7G9tmgN5DQ4zymZidwYz3BYzLdTsCDGJH99QAAAAA=');

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Bestand-diff onderdrukt omdat een of meer regels te lang zijn

Sommige bestanden werden niet getoond omdat er teveel bestanden zijn veranderd in deze diff Meer weergeven