migrate classes to OXID-eSales/oxideshop_ce V6.0.0

added .gitignore
This commit is contained in:
kristianhempel 2018-01-25 11:27:47 +01:00
bovenliggende 62413d02ef
commit 1187854c86
11 gewijzigde bestanden met toevoegingen van 353 en 227 verwijderingen

53
.gitignore vendored Normal file
Bestand weergeven

@ -0,0 +1,53 @@
# Created by .ignore support plugin (hsz.mobi)
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
# Gradle:
.idea/**/gradle.xml
.idea/**/libraries
# CMake
cmake-build-debug/
cmake-build-release/
# Mongo Explorer plugin:
.idea/**/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

Bestand weergeven

@ -71,6 +71,10 @@ class d3dev extends \OxidEsales\EshopProfessional\Application\Controller\Fronten
}
}
/**
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/
public function showOrderMailContent()
{
header('Content-type: text/html; charset='.Registry::getLang()->translateString('charset'));
@ -93,6 +97,9 @@ class d3dev extends \OxidEsales\EshopProfessional\Application\Controller\Fronten
die();
}
/**
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
*/
public function showInquiryMailContent()
{
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value

Bestand weergeven

@ -1,109 +1,109 @@
<?php
use OxidEsales\Eshop\Core\Registry;
/**
* Metadata version
*/
$sMetadataVersion = '1.1';
$sStyle = class_exists('d3dev') ? "background-color: darkred; color: white; padding: 0 10px;" : "";
/**
* Module information
*/
$aModule = array(
'id' => 'd3dev',
'title' =>
(class_exists(D3\ModCfg\Application\Model\d3utils::class) ? D3\ModCfg\Application\Model\d3utils::getInstance()->getD3Logo() : 'D&sup3;') .
' <span style="'.$sStyle.'">TPL Development Tool</span>',
'description' => array(
'de' => '<script type="text/javascript"><!--
function showNote() {
var _oElem = document.getElementById("secnote");
if (_oElem.style.display == "block") {
_oElem.style.display = "none";
} else {
_oElem.style.display = "block";
}
}
--></script>
<p style="background-color: darkred; padding: 5px;"><a href="#" style="text-decoration: underline; color: white;" onclick="showNote(); return false;"><b>Sicherheitshinweis</b></a></p>
<p style="display: none; background-color: darkred; color: white; padding: 5px;" id="secnote">Diese Shoperweiterung stellt Entwicklungshilfen zur Verf&uuml;gung, die im Livebetrieb sicherheitskritisch sein k&ouml;nnen. Es k&ouml;nnen Kunden- und Bestelldaten ausgelesen und auch Shopfunktionen manipuliert werden. Aktivieren Sie diese Erweiterung daher nur in einem Umfeld, in dem Sie Missbrauch ausschlie&szligen k&ouml;nnen. F&uuml;r entstandene Sch&auml;den lehnen wir jede Haftung ab.</p>
<ul><li>unterbindet L&ouml;schen des Warenkorbs nach Bestellabschluss</li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=thankyou&d3dev=1&d3ordernr=" target="_new">Thankyou-Seite ist ohne Bestellung aufrufbar*</a></li>'.
'<li>Mail-Templates k&ouml;nnen im Browser ausgegeben werden'.
'<ul>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showOrderMailContent&type=owner_html&d3ordernr=" target="_new">Order Owner HTML*</a></li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showOrderMailContent&type=owner_plain&d3ordernr=" target="_new">Order Owner Plain*</a></li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showOrderMailContent&type=user_html&d3ordernr=" target="_new">Order User HTML*</a></li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showOrderMailContent&type=user_plain&d3ordernr=" target="_new">Order User Plain*</a></li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showInquiryMailContent&type=owner_html&d3inquirynr=" target="_new">Inquiry Owner HTML*</a></li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showInquiryMailContent&type=owner_plain&d3inquirynr=" target="_new">Inquiry Owner Plain*</a></li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showInquiryMailContent&type=user_html&d3inquirynr=" target="_new">Inquiry User HTML*</a></li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showInquiryMailContent&type=user_plain&d3inquirynr=" target="_new">Inquiry User Plain*</a></li></ul>'.
'</li>'.
'<li>blockiert &uuml;bers Framework versendete Mails oder leitet diese um</li>'.
'</ul><br>Jede dieser Optionen muss aus Sicherheitsgr&uuml;nden unter "Einstell." aktiviert werden. Weiterhin darf der Shop nicht im Produktivmodus betrieben werden.<br><br>'.
'* Ordernummer an URL erg&auml;nzen, wenn bestimmte Bestellungen angezeigt werden sollen',
'en' => ''),
// 'thumbnail' => 'picture.png',
'version' => '1.2.0.0',
'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'http://www.oxidmodule.com/',
'extend' => array(
'thankyou' => 'd3/d3dev/modules/controllers/d3_dev_thankyou',
'oxorder' => 'd3/d3dev/modules/models/d3_dev_oxorder',
'oxorderarticle' => 'd3/d3dev/modules/models/d3_dev_oxorderarticle',
'oxemail' => 'd3/d3dev/modules/models/d3_dev_oxemail',
'oxbasket' => 'd3/d3dev/modules/models/d3_dev_oxbasket',
'oxbasketitem' => 'd3/d3dev/modules/models/d3_dev_oxbasketitem',
),
'files' => array(
'd3dev' => 'd3/d3dev/controllers/d3dev.php',
),
'templates' => array(
),
'events' => array(
),
'blocks' => array(
),
'settings' => array(
array(
'group' => 'd3dev_order',
'name' => 'blD3DevAvoidDelBasket',
'type' => 'bool',
'value' => 'false'
),
array(
'group' => 'd3dev_order',
'name' => 'blD3DevShowThankyou',
'type' => 'bool',
'value' => 'false'
),
array(
'group' => 'd3dev_mail',
'name' => 'blD3DevShowOrderMailsInBrowser',
'type' => 'bool',
'value' => 'false'
),
array(
'group' => 'd3dev_mailblock',
'name' => 'blD3DevBlockMails',
'type' => 'bool',
'value' => 'false'
),
array(
'group' => 'd3dev_mailblock',
'name' => 'sD3DevRedirectMail',
'type' => 'str',
'value' => 'd3test1@shopmodule.com'
),
),
);
if (class_exists('d3inquiry')) {
$aModule['extend']['d3inquiry'] = 'd3/d3dev/modules/models/d3_dev_d3inquiry';
$aModule['extend']['d3inquiryarticle'] = 'd3/d3dev/modules/models/d3_dev_d3inquiryarticle';
}
<?php
use OxidEsales\Eshop\Core\Registry;
/**
* Metadata version
*/
$sMetadataVersion = '1.1';
$sStyle = class_exists('d3dev') ? "background-color: darkred; color: white; padding: 0 10px;" : "";
/**
* Module information
*/
$aModule = array(
'id' => 'd3dev',
'title' =>
(class_exists(D3\ModCfg\Application\Model\d3utils::class) ? D3\ModCfg\Application\Model\d3utils::getInstance()->getD3Logo() : 'D&sup3;') .
' <span style="'.$sStyle.'">TPL Development Tool</span>',
'description' => array(
'de' => '<script type="text/javascript"><!--
function showNote() {
var _oElem = document.getElementById("secnote");
if (_oElem.style.display == "block") {
_oElem.style.display = "none";
} else {
_oElem.style.display = "block";
}
}
--></script>
<p style="background-color: darkred; padding: 5px;"><a href="#" style="text-decoration: underline; color: white;" onclick="showNote(); return false;"><b>Sicherheitshinweis</b></a></p>
<p style="display: none; background-color: darkred; color: white; padding: 5px;" id="secnote">Diese Shoperweiterung stellt Entwicklungshilfen zur Verf&uuml;gung, die im Livebetrieb sicherheitskritisch sein k&ouml;nnen. Es k&ouml;nnen Kunden- und Bestelldaten ausgelesen und auch Shopfunktionen manipuliert werden. Aktivieren Sie diese Erweiterung daher nur in einem Umfeld, in dem Sie Missbrauch ausschlie&szligen k&ouml;nnen. F&uuml;r entstandene Sch&auml;den lehnen wir jede Haftung ab.</p>
<ul><li>unterbindet L&ouml;schen des Warenkorbs nach Bestellabschluss</li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=thankyou&d3dev=1&d3ordernr=" target="_new">Thankyou-Seite ist ohne Bestellung aufrufbar*</a></li>'.
'<li>Mail-Templates k&ouml;nnen im Browser ausgegeben werden'.
'<ul>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showOrderMailContent&type=owner_html&d3ordernr=" target="_new">Order Owner HTML*</a></li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showOrderMailContent&type=owner_plain&d3ordernr=" target="_new">Order Owner Plain*</a></li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showOrderMailContent&type=user_html&d3ordernr=" target="_new">Order User HTML*</a></li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showOrderMailContent&type=user_plain&d3ordernr=" target="_new">Order User Plain*</a></li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showInquiryMailContent&type=owner_html&d3inquirynr=" target="_new">Inquiry Owner HTML*</a></li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showInquiryMailContent&type=owner_plain&d3inquirynr=" target="_new">Inquiry Owner Plain*</a></li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showInquiryMailContent&type=user_html&d3inquirynr=" target="_new">Inquiry User HTML*</a></li>'.
'<li><a style="text-decoration: underline;" href="'.Registry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showInquiryMailContent&type=user_plain&d3inquirynr=" target="_new">Inquiry User Plain*</a></li></ul>'.
'</li>'.
'<li>blockiert &uuml;bers Framework versendete Mails oder leitet diese um</li>'.
'</ul><br>Jede dieser Optionen muss aus Sicherheitsgr&uuml;nden unter "Einstell." aktiviert werden. Weiterhin darf der Shop nicht im Produktivmodus betrieben werden.<br><br>'.
'* Ordernummer an URL erg&auml;nzen, wenn bestimmte Bestellungen angezeigt werden sollen',
'en' => ''),
// 'thumbnail' => 'picture.png',
'version' => '1.2.0.0',
'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com',
'url' => 'http://www.oxidmodule.com/',
'extend' => array(
'thankyou' => 'd3/d3dev/modules/controllers/d3_dev_thankyou',
'oxorder' => 'd3/d3dev/modules/models/d3_dev_oxorder',
'oxorderarticle' => 'd3/d3dev/modules/models/d3_dev_oxorderarticle',
'oxemail' => 'd3/d3dev/modules/models/d3_dev_oxemail',
'oxbasket' => 'd3/d3dev/modules/models/d3_dev_oxbasket',
'oxbasketitem' => 'd3/d3dev/modules/models/d3_dev_oxbasketitem',
),
'files' => array(
'd3dev' => 'd3/d3dev/controllers/d3dev.php',
),
'templates' => array(
),
'events' => array(
),
'blocks' => array(
),
'settings' => array(
array(
'group' => 'd3dev_order',
'name' => 'blD3DevAvoidDelBasket',
'type' => 'bool',
'value' => 'false'
),
array(
'group' => 'd3dev_order',
'name' => 'blD3DevShowThankyou',
'type' => 'bool',
'value' => 'false'
),
array(
'group' => 'd3dev_mail',
'name' => 'blD3DevShowOrderMailsInBrowser',
'type' => 'bool',
'value' => 'false'
),
array(
'group' => 'd3dev_mailblock',
'name' => 'blD3DevBlockMails',
'type' => 'bool',
'value' => 'false'
),
array(
'group' => 'd3dev_mailblock',
'name' => 'sD3DevRedirectMail',
'type' => 'str',
'value' => 'd3test1@shopmodule.com'
),
),
);
if (class_exists('d3inquiry')) {
$aModule['extend']['d3inquiry'] = 'd3/d3dev/modules/models/d3_dev_d3inquiry';
$aModule['extend']['d3inquiryarticle'] = 'd3/d3dev/modules/models/d3_dev_d3inquiryarticle';
}

Bestand weergeven

@ -1,8 +1,9 @@
<?php
// .../?cl=thankyou[&d3orderid=23]
use OxidEsales\Eshop\Core\Registry;
/**
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
@ -19,17 +20,23 @@
class d3_dev_thankyou extends d3_dev_thankyou_parent
{
/**
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
* @throws object
* @throws oxUserException
*/
public function init()
{
$sSessChallenge = oxRegistry::getSession()->getVariable('sess_challenge');
$sSessChallenge = Registry::getSession()->getVariable('sess_challenge');
parent::init();
oxRegistry::getSession()->setVariable('sess_challenge', $sSessChallenge);
Registry::getSession()->setVariable('sess_challenge', $sSessChallenge);
if (oxRegistry::getConfig()->getRequestParameter('d3dev')
&& false == (bool) oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value
&& oxRegistry::getConfig()->getConfigParam('blD3DevShowThankyou')
if (oxNew(\OxidEsales\Eshop\Core\Request::class)->getRequestParameter('d3dev')
&& false == (bool) Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value
&& Registry::getConfig()->getConfigParam('blD3DevShowThankyou')
) {
$this->_d3authenticate();
$oOrder = $this->d3GetLastOrder();
@ -38,13 +45,17 @@ class d3_dev_thankyou extends d3_dev_thankyou_parent
}
}
/**
* @throws object
* @throws oxUserException
*/
protected function _d3authenticate ()
{
$oConfig = oxRegistry::getConfig();
$request = oxNew(\OxidEsales\Eshop\Core\Request::class);
try {
$sUser = $oConfig->getRequestParameter( 'usr' );
$sPassword = $oConfig->getRequestParameter( 'pwd' );
$sUser = $request->getRequestParameter( 'usr' );
$sPassword = $request->getRequestParameter( 'pwd' );
if ( !$sUser || !$sPassword ) {
$sUser = $_SERVER[ 'PHP_AUTH_USER' ];
@ -67,16 +78,16 @@ class d3_dev_thankyou extends d3_dev_thankyou_parent
}
}
}
/** @var oxUser $oUser */
$oUser = oxNew( 'oxuser' );
/** @var \OxidEsales\Eshop\Application\Model\User $oUser */
$oUser = oxNew( \OxidEsales\Eshop\Application\Model\User::class );
if ( !$sUser || !$sPassword || !$oUser->login( $sUser, $sPassword ) ) {
$oEx = oxNew( 'oxuserexception' );
$oEx->setMessage( 'EXCEPTION_USER_NOVALIDLOGIN' );
/** @var \OxidEsales\Eshop\Core\Exception\UserException $oEx */
$oEx = oxNew( \OxidEsales\Eshop\Core\Exception\UserException::class, 'EXCEPTION_USER_NOVALIDLOGIN');
throw $oEx;
}
}
catch ( Exception $oEx ) {
$oShop = $oConfig->getActiveShop();
$oShop = Registry::getConfig()->getActiveShop();
header( 'WWW-Authenticate: Basic realm="' . $oShop->oxshops__oxname->value . '"' );
header( 'HTTP/1.0 401 Unauthorized' );
exit( 1 );
@ -84,27 +95,30 @@ class d3_dev_thankyou extends d3_dev_thankyou_parent
}
/**
* @return d3_dev_oxorder
* @return bool|d3_dev_oxorder
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/
public function d3GetLastOrder()
{
if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
return false;
}
/** @var d3_dev_oxorder $oOrder */
$oOrder = oxNew('oxorder');
$oOrder = oxNew(\OxidEsales\Eshop\Application\Model\Order::class);
$oOrder->d3getLastOrder();
return $oOrder;
}
/**
* @return d3_dev_d3inquiry
* @return bool|d3_dev_d3inquiry
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
*/
public function d3GetLastInquiry()
{
if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
return false;
}

Bestand weergeven

@ -1,5 +1,9 @@
<?php
/**
use OxidEsales\Eshop\Core\DatabaseProvider;
use OxidEsales\Eshop\Core\Registry;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
@ -20,11 +24,13 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
/**
* @return d3_dev_oxbasket
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/
public function d3DevGetOrderBasket()
{
/** @var oxbasket $oBasket */
$oBasket = $this->_getInquiryBasket();
$this->_getInquiryBasket();
// unsetting bundles
$oOrderArticles = $this->getInquiryArticles();
@ -45,20 +51,24 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
/**
* @return string
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
*/
public function d3getLastInquiryId()
{
if (oxRegistry::getConfig()->getRequestParameter('d3inquirynr')) {
$sWhere = ' oxinquirynr = ' . (int) oxRegistry::getConfig()->getRequestParameter('d3inquirynr');
} else {
$sWhere = 1;
$inquiryNr = (int) oxNew(\OxidEsales\Eshop\Core\Request::class)->getRequestParameter('d3inquirynr');
$sWhere = 1;
if ($inquiryNr) {
$sWhere = ' oxinquirynr = ' . $inquiryNr;
}
$sSelect = "SELECT oxid FROM ".getViewName('d3inquiry')." WHERE ".$sWhere." ORDER BY oxinquirydate DESC LIMIT 1";
return oxDb::getDb(oxDb::FETCH_MODE_ASSOC)->getOne($sSelect);
return DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getOne($sSelect);
}
/**
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
*/
public function d3getLastInquiry()
{
$this->load($this->d3getLastInquiryId());
@ -67,23 +77,29 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
/**
* @return oxBasket
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/
public function getBasket()
{
$oBasket = parent::getBasket();
if (false == $oBasket && oxRegistry::getConfig()->getActiveView()->getClassName() == 'd3dev') {
if (false == $oBasket && Registry::getConfig()->getActiveView()->getClassKey() == 'd3dev') {
$oBasket = $this->d3DevGetOrderBasket();
}
return $oBasket;
}
/**
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/
protected function _d3AddVouchers()
{
$sSelect = "SELECT oxid FROM oxvouchers WHERE oxorderid = ".oxDb::getDb(oxDb::FETCH_MODE_ASSOC)->quote($this->getId()).";";
$aResult = oxDb::getDb(oxDb::FETCH_MODE_ASSOC)->getArray($sSelect);
$sSelect = "SELECT oxid FROM oxvouchers WHERE oxorderid = ". DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->quote($this->getId()).";";
$aResult = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getAll($sSelect);
foreach ($aResult as $aFields) {
$oVoucher = oxNew('oxvoucher');
@ -97,11 +113,14 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
*
* @param bool $blStockCheck perform stock check or not (default true)
*
* @return oxBasket
* @return \OxidEsales\Eshop\Application\Model\Basket
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/
protected function _getInquiryBasket($blStockCheck = true)
{
$this->_oOrderBasket = oxNew("oxBasket");
/** @var \OxidEsales\Eshop\Application\Model\Basket _oOrderBasket */
$this->_oOrderBasket = oxNew(\OxidEsales\Eshop\Application\Model\Basket::class);
$this->_oOrderBasket->enableSaveToDataBase(false);
//setting recalculation mode
@ -117,7 +136,7 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
$this->_oOrderBasket->setInquiryId($this->getId());
// setting basket currency order uses
$aCurrencies = $this->getConfig()->getCurrencyArray();
$aCurrencies = Registry::getConfig()->getCurrencyArray();
foreach ($aCurrencies as $oCur) {
if ($oCur->name == $this->oxorder__oxcurrency->value) {
$oBasketCur = $oCur;
@ -133,7 +152,7 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
$this->_oOrderBasket->setCardMessage($this->oxorder__oxcardtext->value);
if ($this->_blReloadDiscount) {
$oDb = oxDb::getDb(oxDb::FETCH_MODE_ASSOC);
$oDb = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC);
// disabling availability check
$this->_oOrderBasket->setSkipVouchersChecking(true);

Bestand weergeven

@ -1,5 +1,8 @@
<?php
/**
use OxidEsales\Eshop\Core\Registry;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
@ -18,8 +21,8 @@ class d3_dev_oxbasket extends d3_dev_oxbasket_parent
{
public function deleteBasket()
{
if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value
|| false == oxRegistry::getConfig()->getConfigParam('blD3DevAvoidDelBasket')
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value
|| false == Registry::getConfig()->getConfigParam('blD3DevAvoidDelBasket')
) {
parent::deleteBasket();
}

Bestand weergeven

@ -21,6 +21,12 @@ class d3_dev_oxbasketitem extends d3_dev_oxbasketitem_parent
$this->_oArticle = null;
}
/**
* @return string
* @throws \OxidEsales\EshopCommunity\Application\Model\oxArticleException
* @throws \OxidEsales\Eshop\Core\Exception\StandardException
* @throws oxNoArticleException
*/
public function getTitle()
{
$oArticle = $this->getArticle();

Bestand weergeven

@ -1,5 +1,8 @@
<?php
/**
use OxidEsales\Eshop\Core\Registry;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
@ -19,11 +22,13 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
/**
* @param d3_dev_oxorder $oOrder
*
* @param $sType
*
* @return mixed|string
*/
public function d3GetOrderMailContent($oOrder, $sType)
{
if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
return '';
}
@ -59,7 +64,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
// send not pretending from order user, as different email domain rise spam filters
$this->setFrom($oShop->oxshops__oxowneremail->value);
$oLang = oxRegistry::getLang();
$oLang = Registry::getLang();
$iOrderLang = $oLang->getObjectTplLanguage();
// if running shop language is different from admin lang. set in config
@ -71,6 +76,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
$this->setSmtp($oShop);
// create messages
/** @var Smarty $oSmarty */
$oSmarty = $this->_getSmarty();
$this->setViewData("order", $oOrder);
@ -83,11 +89,13 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
/**
* @param d3_dev_d3inquiry $oInquiry
*
* @param $sType
*
* @return mixed|string
*/
public function d3GetInquiryMailContent($oInquiry, $sType)
{
if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
return '';
}
@ -123,7 +131,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
// send not pretending from order user, as different email domain rise spam filters
$this->setFrom($oShop->oxshops__oxowneremail->value);
$oLang = oxRegistry::getLang();
$oLang = Registry::getLang();
$iOrderLang = $oLang->getObjectTplLanguage();
// if running shop language is different from admin lang. set in config
@ -135,6 +143,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
$this->setSmtp($oShop);
// create messages
/** @var Smarty $oSmarty */
$oSmarty = $this->_getSmarty();
$this->setViewData("inquiry", $oInquiry);
@ -146,7 +155,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
protected function _sendMail()
{
if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
return parent::_sendMail();
}
@ -223,10 +232,10 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
public function getNewRecipient($sMailAddress)
{
if (oxRegistry::getConfig()->getConfigParam('blD3DevBlockMails')) {
if (Registry::getConfig()->getConfigParam('blD3DevBlockMails')) {
return false;
} elseif (oxRegistry::getConfig()->getConfigParam('sD3DevRedirectMail')) {
return trim(oxRegistry::getConfig()->getConfigParam('sD3DevRedirectMail'));
} elseif (Registry::getConfig()->getConfigParam('sD3DevRedirectMail')) {
return trim(Registry::getConfig()->getConfigParam('sD3DevRedirectMail'));
}
return $sMailAddress;

Bestand weergeven

@ -1,5 +1,9 @@
<?php
/**
use OxidEsales\Eshop\Core\DatabaseProvider;
use OxidEsales\Eshop\Core\Registry;
/**
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
*
@ -25,8 +29,10 @@ class d3_dev_oxorder extends d3_dev_oxorder_parent
$oBasket = $this->_getOrderBasket();
// unsetting bundles
/** @var \OxidEsales\Eshop\Core\Model\ListModel $oOrderArticles */
$oOrderArticles = $this->getOrderArticles();
foreach ($oOrderArticles as $sItemId => $oItem) {
/** @var $oItem \OxidEsales\Eshop\Application\Model\OrderArticle */
if ($oItem->isBundle()) {
$oOrderArticles->offsetUnset($sItemId);
}
@ -45,20 +51,25 @@ class d3_dev_oxorder extends d3_dev_oxorder_parent
/**
* @return string
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
*/
public function d3getLastOrderId()
{
if (oxRegistry::getConfig()->getRequestParameter('d3ordernr')) {
$sWhere = ' oxordernr = ' . (int) oxRegistry::getConfig()->getRequestParameter('d3ordernr');
} else {
$sWhere = 1;
$orderNr = (int) oxNew(\OxidEsales\Eshop\Core\Request::class)->getRequestParameter('d3ordernr');
$sWhere = 1;
if ($orderNr) {
$sWhere = ' oxordernr = ' . $orderNr;
}
$sSelect = "SELECT oxid FROM ".getViewName('oxorder')." WHERE ".$sWhere." ORDER BY oxorderdate DESC LIMIT 1";
return oxDb::getDb(oxDb::FETCH_MODE_ASSOC)->getOne($sSelect);
return DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getOne($sSelect);
}
/**
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/
public function d3getLastOrder()
{
$this->load($this->d3getLastOrderId());
@ -66,27 +77,31 @@ class d3_dev_oxorder extends d3_dev_oxorder_parent
}
/**
* @return oxBasket
* @return d3_dev_oxbasket|\OxidEsales\Eshop\Application\Model\Basket
*/
public function getBasket()
{
$oBasket = parent::getBasket();
if (false == $oBasket && oxRegistry::getConfig()->getActiveView()->getClassName() == 'd3dev') {
if (false == $oBasket && Registry::getConfig()->getActiveView()->getClassKey() == 'd3dev') {
$oBasket = $this->d3DevGetOrderBasket();
}
return $oBasket;
}
/**
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
*/
protected function _d3AddVouchers()
{
$sSelect = "SELECT oxid FROM oxvouchers WHERE oxorderid = ".oxDb::getDb(oxDb::FETCH_MODE_ASSOC)->quote($this->getId()).";";
$aResult = oxDb::getDb(oxDb::FETCH_MODE_ASSOC)->getArray($sSelect);
$sSelect = "SELECT oxid FROM oxvouchers WHERE oxorderid = ".DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->quote($this->getId()).";";
$aResult = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getAll($sSelect);
foreach ($aResult as $aFields) {
$oVoucher = oxNew('oxvoucher');
$oVoucher = oxNew(\OxidEsales\Eshop\Application\Model\Voucher::class);
$oVoucher->load($aFields['oxid']);
$this->_aVoucherList[$oVoucher->getId()] = $oVoucher;
}

Bestand weergeven

@ -17,7 +17,7 @@
class d3_dev_oxorderarticle extends d3_dev_oxorderarticle_parent
{
/**
* @return array
* @return null|\OxidEsales\EshopCommunity\Application\Model\ArticleList
*/
public function getCustomerAlsoBoughtThisProducts()
{

Bestand weergeven

@ -1,57 +1,57 @@
<?php
/**
* TPL Development Tool
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright © Data Development, Thomas Dartsch
* @package OrderManager
* @author Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
$sLangName = "Deutsch";
// -------------------------------
// RESOURCE IDENTITFIER = STRING
// -------------------------------
$aLang = array(
//Navigation
'charset' => 'ISO-8859-15',
'SHOP_MODULE_GROUP_d3dev_order' => 'Bestellungsablauf manipulieren',
'SHOP_MODULE_blD3DevAvoidDelBasket' => 'Warenkorb wird nach Bestellabschluss nicht geleert',
'HELP_SHOP_MODULE_blD3DevAvoidDelBasket' => 'Damit kann auf der Bestellbestätigungsseite '.
'(Thankyou) durch den "zurück"-Button in den Warenkorb Schritt 4 gewechselt werden und die Bestellung erneut '.
'abgeschickt werden. Eine erneute Bestückung des Warenkorbs ist nicht nötig. Beim erneuten Absenden wird '.
'jeweils eine weitere Bestellung angelegt werden. Eventuell verwendete Gutscheine müssen so eingestellt '.
'werden, dass diese mehrfach verwendet werden können.',
'SHOP_MODULE_blD3DevShowThankyou' => 'Thankyou-Seite kann auch ohne Bestellung '.
'aufgerufen werden',
'HELP_SHOP_MODULE_blD3DevShowThankyou' => 'Ohne abgesendete Bestellung läßt sich die '.
'Thankyou-Seite im Standardshop nicht aufrufen. Diese Option stellt dies für Entwicklungszwecke zur '.
'Verfügung. <br>Den Link zum Seitenaufruf haben wir hier im Stamm-Tab hinterlegt. Die Seite öffnet sich in '.
'einem neuen Browserfenster. <br>Für die Anzeige wird die letzte vorliegende Bestellung geladen. Über den '.
'Parameter "d3ordernr=X" kann eine bestimmten Bestellung vorgegeben werden.',
'SHOP_MODULE_GROUP_d3dev_mail' => 'Mailanzeige',
'SHOP_MODULE_blD3DevShowOrderMailsInBrowser' => 'Bestellbestätigungsmails können im Browser '.
'angezeigt werden',
'HELP_SHOP_MODULE_blD3DevShowOrderMailsInBrowser' => 'Die Links zu den '.
'jeweiligen Mails sind im Stamm-Tab aufgelistet.<br>Für die Anzeige wird ohne Angabe der Bestellnummer die '.
'letzte vorliegende Bestellung geladen. Über den Parameter "d3ordernr=X" kann eine bestimmten Bestellung '.
'vorgegeben werden.',
'SHOP_MODULE_GROUP_d3dev_mailblock' => 'Mailversand',
'SHOP_MODULE_blD3DevBlockMails' => 'Mails an beliebige Mailadressen werden nicht '.
'versandt',
'HELP_SHOP_MODULE_blD3DevBlockMails' => 'Der Mailversand wird komplett geblockt.',
'SHOP_MODULE_sD3DevRedirectMail' => 'versendete Mails an diese Adresse umleiten',
'HELP_SHOP_MODULE_sD3DevRedirectMail' => 'Wenn leer, erfolgt keine Umleitung. Ohne '.
'zusätzliche Blockieroption werden die Mails dann an den original Empfänger gesendet.',
);
<?php
/**
* TPL Development Tool
* This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware.
* Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by
* civil and criminal law.
* http://www.shopmodule.com
*
* @copyright © Data Development, Thomas Dartsch
* @package OrderManager
* @author Data Development - Daniel Seifert <support@shopmodule.com>
* @link http://www.oxidmodule.com
*/
$sLangName = "Deutsch";
// -------------------------------
// RESOURCE IDENTITFIER = STRING
// -------------------------------
$aLang = array(
//Navigation
'charset' => 'UTF-8',
'SHOP_MODULE_GROUP_d3dev_order' => 'Bestellungsablauf manipulieren',
'SHOP_MODULE_blD3DevAvoidDelBasket' => 'Warenkorb wird nach Bestellabschluss nicht geleert',
'HELP_SHOP_MODULE_blD3DevAvoidDelBasket' => 'Damit kann auf der Bestellbestätigungsseite '.
'(Thankyou) durch den "zurück"-Button in den Warenkorb Schritt 4 gewechselt werden und die Bestellung erneut '.
'abgeschickt werden. Eine erneute Bestückung des Warenkorbs ist nicht nötig. Beim erneuten Absenden wird '.
'jeweils eine weitere Bestellung angelegt werden. Eventuell verwendete Gutscheine müssen so eingestellt '.
'werden, dass diese mehrfach verwendet werden können.',
'SHOP_MODULE_blD3DevShowThankyou' => 'Thankyou-Seite kann auch ohne Bestellung '.
'aufgerufen werden',
'HELP_SHOP_MODULE_blD3DevShowThankyou' => 'Ohne abgesendete Bestellung läßt sich die '.
'Thankyou-Seite im Standardshop nicht aufrufen. Diese Option stellt dies für Entwicklungszwecke zur '.
'Verfügung. <br>Den Link zum Seitenaufruf haben wir hier im Stamm-Tab hinterlegt. Die Seite öffnet sich in '.
'einem neuen Browserfenster. <br>Für die Anzeige wird die letzte vorliegende Bestellung geladen. Über den '.
'Parameter "d3ordernr=X" kann eine bestimmten Bestellung vorgegeben werden.',
'SHOP_MODULE_GROUP_d3dev_mail' => 'Mailanzeige',
'SHOP_MODULE_blD3DevShowOrderMailsInBrowser' => 'Bestellbestätigungsmails können im Browser '.
'angezeigt werden',
'HELP_SHOP_MODULE_blD3DevShowOrderMailsInBrowser' => 'Die Links zu den '.
'jeweiligen Mails sind im Stamm-Tab aufgelistet.<br>Für die Anzeige wird ohne Angabe der Bestellnummer die '.
'letzte vorliegende Bestellung geladen. Über den Parameter "d3ordernr=X" kann eine bestimmten Bestellung '.
'vorgegeben werden.',
'SHOP_MODULE_GROUP_d3dev_mailblock' => 'Mailversand',
'SHOP_MODULE_blD3DevBlockMails' => 'Mails an beliebige Mailadressen werden nicht '.
'versandt',
'HELP_SHOP_MODULE_blD3DevBlockMails' => 'Der Mailversand wird komplett geblockt.',
'SHOP_MODULE_sD3DevRedirectMail' => 'versendete Mails an diese Adresse umleiten',
'HELP_SHOP_MODULE_sD3DevRedirectMail' => 'Wenn leer, erfolgt keine Umleitung. Ohne '.
'zusätzliche Blockieroption werden die Mails dann an den original Empfänger gesendet.',
);