migrate metadata, IntelliSenseHelper and class d3dev to oxid V6.0.0
This commit is contained in:
parent
f46ac0e6da
commit
62413d02ef
@ -14,12 +14,12 @@
|
||||
* @link http://www.oxidmodule.com
|
||||
*/
|
||||
|
||||
class d3_dev_thankyou_parent extends thankyou {}
|
||||
class d3_dev_thankyou_parent extends \OxidEsales\Eshop\Application\Controller\ThankYouController {}
|
||||
|
||||
/**
|
||||
* Class d3_dev_oxorder_parent
|
||||
*/
|
||||
class d3_dev_oxorder_parent extends oxorder {}
|
||||
class d3_dev_oxorder_parent extends \OxidEsales\Eshop\Application\Model\Order {}
|
||||
|
||||
/**
|
||||
* Class d3_dev_d3inquiry_parent
|
||||
@ -29,24 +29,24 @@ class d3_dev_d3inquiry_parent extends d3inquiry {}
|
||||
/**
|
||||
* Class d3_dev_oxorderarticle
|
||||
*/
|
||||
class d3_dev_oxorderarticle_parent extends oxOrderArticle {}
|
||||
class d3_dev_oxorderarticle_parent extends \OxidEsales\Eshop\Application\Model\OrderArticle {}
|
||||
|
||||
/**
|
||||
* Class d3_dev_oxemail_parent
|
||||
*/
|
||||
class d3_dev_oxemail_parent extends oxemail {}
|
||||
class d3_dev_oxemail_parent extends \OxidEsales\Eshop\Core\Email {}
|
||||
|
||||
/**
|
||||
* Class d3_dev_order_parent
|
||||
*/
|
||||
class d3_dev_order_parent extends order {}
|
||||
class d3_dev_order_parent extends \OxidEsales\Eshop\Application\Controller\OrderController {}
|
||||
|
||||
/**
|
||||
* Class d3_dev_oxbasket_parent
|
||||
*/
|
||||
class d3_dev_oxbasket_parent extends oxbasket {}
|
||||
class d3_dev_oxbasket_parent extends \OxidEsales\Eshop\Application\Model\Basket {}
|
||||
|
||||
/**
|
||||
* Class d3_dev_oxbasketitem_parent
|
||||
*/
|
||||
class d3_dev_oxbasketitem_parent extends oxBasketItem {}
|
||||
class d3_dev_oxbasketitem_parent extends \OxidEsales\Eshop\Application\Model\BasketItem {}
|
||||
|
@ -1,5 +1,9 @@
|
||||
<?php
|
||||
/**
|
||||
|
||||
use OxidEsales\Eshop\Core\Registry;
|
||||
use OxidEsales\Eshop\Core\Request;
|
||||
|
||||
/**
|
||||
* This Software is the property of Data Development and is protected
|
||||
* by copyright law - it is NOT Freeware.
|
||||
*
|
||||
@ -14,7 +18,7 @@
|
||||
* @link http://www.oxidmodule.com
|
||||
*/
|
||||
|
||||
class d3dev extends oxUBase
|
||||
class d3dev extends \OxidEsales\EshopProfessional\Application\Controller\FrontendController
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
@ -25,11 +29,10 @@ class d3dev extends oxUBase
|
||||
|
||||
protected function _authenticate ()
|
||||
{
|
||||
$oConfig = oxRegistry::getConfig();
|
||||
|
||||
$request = oxNew(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' ];
|
||||
@ -52,16 +55,16 @@ class d3dev extends oxUBase
|
||||
}
|
||||
}
|
||||
}
|
||||
/** @var oxUser $oUser */
|
||||
$oUser = oxNew( 'oxuser' );
|
||||
$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 );
|
||||
@ -70,42 +73,42 @@ class d3dev extends oxUBase
|
||||
|
||||
public function showOrderMailContent()
|
||||
{
|
||||
header('Content-type: text/html; charset='.oxRegistry::getLang()->translateString('charset'));
|
||||
|
||||
if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value
|
||||
|| false == oxRegistry::getConfig()->getConfigParam('blD3DevShowOrderMailsInBrowser')
|
||||
header('Content-type: text/html; charset='.Registry::getLang()->translateString('charset'));
|
||||
|
||||
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value
|
||||
|| false == Registry::getConfig()->getConfigParam('blD3DevShowOrderMailsInBrowser')
|
||||
) {
|
||||
oxRegistry::getUtils()->redirect(oxRegistry::getConfig()->getShopUrl().'index.php?cl=start');
|
||||
Registry::getUtils()->redirect(Registry::getConfig()->getShopUrl().'index.php?cl=start');
|
||||
}
|
||||
|
||||
$sTpl = oxRegistry::getConfig()->getRequestParameter('type');
|
||||
$sTpl = oxNew(Request::class)->getRequestParameter('type');
|
||||
|
||||
/** @var d3_dev_thankyou $oThankyou */
|
||||
$oThankyou = oxNew('thankyou');
|
||||
$oThankyou = oxNew(\OxidEsales\Eshop\Application\Controller\ThankYouController::class);
|
||||
$oOrder = $oThankyou->d3GetLastOrder();
|
||||
|
||||
/** @var d3_dev_oxemail $oEmail */
|
||||
$oEmail = oxNew('oxemail');
|
||||
$oEmail = oxNew(\OxidEsales\Eshop\Core\Email::class);
|
||||
echo $oEmail->d3GetOrderMailContent($oOrder, $sTpl);
|
||||
die();
|
||||
}
|
||||
|
||||
public function showInquiryMailContent()
|
||||
{
|
||||
if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value
|
||||
|| false == oxRegistry::getConfig()->getConfigParam('blD3DevShowOrderMailsInBrowser')
|
||||
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value
|
||||
|| false == Registry::getConfig()->getConfigParam('blD3DevShowOrderMailsInBrowser')
|
||||
) {
|
||||
oxRegistry::getUtils()->redirect(oxRegistry::getConfig()->getShopUrl().'index.php?cl=start');
|
||||
Registry::getUtils()->redirect(Registry::getConfig()->getShopUrl().'index.php?cl=start');
|
||||
}
|
||||
|
||||
$sTpl = oxRegistry::getConfig()->getRequestParameter('type');
|
||||
$sTpl = oxNew(Request::class)->getRequestParameter('type');
|
||||
|
||||
/** @var d3_dev_thankyou $oThankyou */
|
||||
$oThankyou = oxNew('thankyou');
|
||||
$oThankyou = oxNew(\OxidEsales\Eshop\Application\Controller\ThankYouController::class);
|
||||
$oOrder = $oThankyou->d3GetLastInquiry();
|
||||
|
||||
/** @var d3_dev_oxemail $oEmail */
|
||||
$oEmail = oxNew('oxemail');
|
||||
$oEmail = oxNew(\OxidEsales\Eshop\Core\Email::class);
|
||||
echo $oEmail->d3GetInquiryMailContent($oOrder, $sTpl);
|
||||
die();
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
<?php
|
||||
use OxidEsales\Eshop\Core\Registry;
|
||||
|
||||
/**
|
||||
* Metadata version
|
||||
*/
|
||||
@ -12,7 +14,7 @@ $sStyle = class_exists('d3dev') ? "background-color: darkred; color: white; padd
|
||||
$aModule = array(
|
||||
'id' => 'd3dev',
|
||||
'title' =>
|
||||
(class_exists('d3utils') ? d3utils::getInstance()->getD3Logo() : 'D³') .
|
||||
(class_exists(D3\ModCfg\Application\Model\d3utils::class) ? D3\ModCfg\Application\Model\d3utils::getInstance()->getD3Logo() : 'D³') .
|
||||
' <span style="'.$sStyle.'">TPL Development Tool</span>',
|
||||
'description' => array(
|
||||
'de' => '<script type="text/javascript"><!--
|
||||
@ -28,17 +30,17 @@ $aModule = array(
|
||||
<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ügung, die im Livebetrieb sicherheitskritisch sein können. Es können Kunden- und Bestelldaten ausgelesen und auch Shopfunktionen manipuliert werden. Aktivieren Sie diese Erweiterung daher nur in einem Umfeld, in dem Sie Missbrauch ausschließen können. Für entstandene Schäden lehnen wir jede Haftung ab.</p>
|
||||
<ul><li>unterbindet Löschen des Warenkorbs nach Bestellabschluss</li>'.
|
||||
'<li><a style="text-decoration: underline;" href="'.oxRegistry::getConfig()->getCurrentShopUrl(false).'index.php?cl=thankyou&d3dev=1&d3ordernr=" target="_new">Thankyou-Seite ist ohne Bestellung aufrufbar*</a></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önnen im Browser ausgegeben werden'.
|
||||
'<ul>'.
|
||||
'<li><a style="text-decoration: underline;" href="'.oxRegistry::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="'.oxRegistry::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="'.oxRegistry::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="'.oxRegistry::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="'.oxRegistry::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="'.oxRegistry::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="'.oxRegistry::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="'.oxRegistry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showInquiryMailContent&type=user_plain&d3inquirynr=" target="_new">Inquiry User Plain*</a></li></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 übers Framework versendete Mails oder leitet diese um</li>'.
|
||||
'</ul><br>Jede dieser Optionen muss aus Sicherheitsgründen unter "Einstell." aktiviert werden. Weiterhin darf der Shop nicht im Produktivmodus betrieben werden.<br><br>'.
|
||||
|
Loading…
x
Reference in New Issue
Block a user