adjustments for OXID version 6
This commit is contained in:
parent
8debed2717
commit
c96203da2c
@ -2,7 +2,15 @@
|
|||||||
|
|
||||||
namespace D3\Devhelper\Application\Controller;
|
namespace D3\Devhelper\Application\Controller;
|
||||||
|
|
||||||
|
use D3\Devhelper\Modules\Application\Controller as ModuleController;
|
||||||
|
use D3\Devhelper\Modules\Core as ModuleCore;
|
||||||
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
||||||
|
use OxidEsales\Eshop\Application\Controller\ThankYouController;
|
||||||
|
use OxidEsales\Eshop\Application\Model\User;
|
||||||
|
use OxidEsales\Eshop\Core\Email;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\UserException;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
use OxidEsales\Eshop\Core\Request;
|
use OxidEsales\Eshop\Core\Request;
|
||||||
|
|
||||||
@ -17,7 +25,7 @@ use OxidEsales\Eshop\Core\Request;
|
|||||||
* http://www.shopmodule.com
|
* http://www.shopmodule.com
|
||||||
*
|
*
|
||||||
* @copyright © D³ Data Development, Thomas Dartsch
|
* @copyright © D³ Data Development, Thomas Dartsch
|
||||||
* @author D³ Data Development - Daniel Seifert <ds@shopmodule.com>
|
* @author D³ Data Development - Daniel Seifert <info@shopmodule.com>
|
||||||
* @link http://www.oxidmodule.com
|
* @link http://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -32,10 +40,9 @@ class d3dev extends FrontendController
|
|||||||
|
|
||||||
protected function _authenticate ()
|
protected function _authenticate ()
|
||||||
{
|
{
|
||||||
$request = oxNew(Request::class);
|
|
||||||
try {
|
try {
|
||||||
$sUser = $request->getRequestParameter( 'usr' );
|
$sUser = Registry::get(Request::class)->getRequestEscapedParameter('usr');
|
||||||
$sPassword = $request->getRequestParameter( 'pwd' );
|
$sPassword = Registry::get(Request::class)->getRequestEscapedParameter('pwd');
|
||||||
|
|
||||||
if ( !$sUser || !$sPassword ) {
|
if ( !$sUser || !$sPassword ) {
|
||||||
$sUser = $_SERVER[ 'PHP_AUTH_USER' ];
|
$sUser = $_SERVER[ 'PHP_AUTH_USER' ];
|
||||||
@ -58,67 +65,67 @@ class d3dev extends FrontendController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$oUser = oxNew( \OxidEsales\Eshop\Application\Model\User::class );
|
$oUser = oxNew( User::class );
|
||||||
if ( !$sUser || !$sPassword || !$oUser->login( $sUser, $sPassword ) ) {
|
if ( !$sUser || !$sPassword || !$oUser->login( $sUser, $sPassword ) ) {
|
||||||
/** @var \OxidEsales\Eshop\Core\Exception\UserException $oEx */
|
/** @var UserException $oEx */
|
||||||
$oEx = oxNew( \OxidEsales\Eshop\Core\Exception\UserException::class, 'EXCEPTION_USER_NOVALIDLOGIN' );
|
$oEx = oxNew( UserException::class, 'EXCEPTION_USER_NOVALIDLOGIN' );
|
||||||
|
|
||||||
throw $oEx;
|
throw $oEx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch ( Exception $oEx ) {
|
catch ( \Exception $oEx ) {
|
||||||
$oShop = Registry::getConfig()->getActiveShop();
|
$oShop = Registry::getConfig()->getActiveShop();
|
||||||
header( 'WWW-Authenticate: Basic realm="' . $oShop->oxshops__oxname->value . '"' );
|
header( 'WWW-Authenticate: Basic realm="' . $oShop->getFieldData('oxname') . '"' );
|
||||||
header( 'HTTP/1.0 401 Unauthorized' );
|
header( 'HTTP/1.0 401 Unauthorized' );
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
* @throws DatabaseConnectionException
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
|
* @throws DatabaseErrorException
|
||||||
*/
|
*/
|
||||||
public function showOrderMailContent()
|
public function showOrderMailContent()
|
||||||
{
|
{
|
||||||
header('Content-type: text/html; charset='.Registry::getLang()->translateString('charset'));
|
header('Content-type: text/html; charset='.Registry::getLang()->translateString('charset'));
|
||||||
|
|
||||||
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value
|
if (Registry::getConfig()->getActiveShop()->isProductiveMode()
|
||||||
|| false == Registry::getConfig()->getConfigParam('blD3DevShowOrderMailsInBrowser')
|
|| false == Registry::getConfig()->getConfigParam('blD3DevShowOrderMailsInBrowser')
|
||||||
) {
|
) {
|
||||||
Registry::getUtils()->redirect(Registry::getConfig()->getShopUrl().'index.php?cl=start');
|
Registry::getUtils()->redirect(Registry::getConfig()->getShopUrl().'index.php?cl=start');
|
||||||
}
|
}
|
||||||
|
|
||||||
$sTpl = oxNew(Request::class)->getRequestParameter('type');
|
$sTpl = Registry::get(Request::class)->getRequestEscapedParameter('type');
|
||||||
|
|
||||||
/** @var d3_dev_thankyou $oThankyou */
|
/** @var ModuleController\d3_dev_thankyou $oThankyou */
|
||||||
$oThankyou = oxNew(\OxidEsales\Eshop\Application\Controller\ThankYouController::class);
|
$oThankyou = oxNew(ThankYouController::class);
|
||||||
$oOrder = $oThankyou->d3GetLastOrder();
|
$oOrder = $oThankyou->d3GetLastOrder();
|
||||||
|
|
||||||
/** @var d3_dev_oxemail $oEmail */
|
/** @var ModuleCore\d3_dev_oxemail $oEmail */
|
||||||
$oEmail = oxNew(\OxidEsales\Eshop\Core\Email::class);
|
$oEmail = oxNew(Email::class);
|
||||||
echo $oEmail->d3GetOrderMailContent($oOrder, $sTpl);
|
echo $oEmail->d3GetOrderMailContent($oOrder, $sTpl);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
* @throws DatabaseConnectionException
|
||||||
*/
|
*/
|
||||||
public function showInquiryMailContent()
|
public function showInquiryMailContent()
|
||||||
{
|
{
|
||||||
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value
|
if (Registry::getConfig()->getActiveShop()->isProductiveMode()
|
||||||
|| false == Registry::getConfig()->getConfigParam('blD3DevShowOrderMailsInBrowser')
|
|| false == Registry::getConfig()->getConfigParam('blD3DevShowOrderMailsInBrowser')
|
||||||
) {
|
) {
|
||||||
Registry::getUtils()->redirect(Registry::getConfig()->getShopUrl().'index.php?cl=start');
|
Registry::getUtils()->redirect(Registry::getConfig()->getShopUrl().'index.php?cl=start');
|
||||||
}
|
}
|
||||||
|
|
||||||
$sTpl = oxNew(Request::class)->getRequestParameter('type');
|
$sTpl = Registry::get(Request::class)->getRequestEscapedParameter('type');
|
||||||
|
|
||||||
/** @var d3_dev_thankyou $oThankyou */
|
/** @var ModuleController\d3_dev_thankyou $oThankyou */
|
||||||
$oThankyou = oxNew(\OxidEsales\Eshop\Application\Controller\ThankYouController::class);
|
$oThankyou = oxNew(ThankYouController::class);
|
||||||
$oOrder = $oThankyou->d3GetLastInquiry();
|
$oOrder = $oThankyou->d3GetLastInquiry();
|
||||||
|
|
||||||
/** @var d3_dev_oxemail $oEmail */
|
/** @var ModuleCore\d3_dev_oxemail $oEmail */
|
||||||
$oEmail = oxNew(\OxidEsales\Eshop\Core\Email::class);
|
$oEmail = oxNew(Email::class);
|
||||||
echo $oEmail->d3GetInquiryMailContent($oOrder, $sTpl);
|
echo $oEmail->d3GetInquiryMailContent($oOrder, $sTpl);
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
@ -10,43 +10,33 @@
|
|||||||
* http://www.shopmodule.com
|
* http://www.shopmodule.com
|
||||||
*
|
*
|
||||||
* @copyright © D³ Data Development, Thomas Dartsch
|
* @copyright © D³ Data Development, Thomas Dartsch
|
||||||
* @author D³ Data Development - Daniel Seifert <ds@shopmodule.com>
|
* @author D³ Data Development - Daniel Seifert <info@shopmodule.com>
|
||||||
* @link http://www.oxidmodule.com
|
* @link http://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace D3\Devhelper\Modules\Application\Controller
|
||||||
|
{
|
||||||
class d3_dev_thankyou_parent extends \OxidEsales\Eshop\Application\Controller\ThankYouController {}
|
class d3_dev_thankyou_parent extends \OxidEsales\Eshop\Application\Controller\ThankYouController {}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
namespace D3\Devhelper\Modules\Application\Model
|
||||||
* Class d3_dev_oxorder_parent
|
{
|
||||||
*/
|
|
||||||
class d3_dev_oxorder_parent extends \OxidEsales\Eshop\Application\Model\Order {}
|
class d3_dev_oxorder_parent extends \OxidEsales\Eshop\Application\Model\Order {}
|
||||||
|
|
||||||
/**
|
|
||||||
* Class d3_dev_d3inquiry_parent
|
|
||||||
*/
|
|
||||||
class d3_dev_d3inquiry_parent extends d3inquiry {}
|
class d3_dev_d3inquiry_parent extends d3inquiry {}
|
||||||
|
|
||||||
/**
|
class d3_dev_d3inquiryarticle_parent extends d3inquiryarticle {}
|
||||||
* Class d3_dev_oxorderarticle
|
|
||||||
*/
|
|
||||||
class d3_dev_oxorderarticle_parent extends \OxidEsales\Eshop\Application\Model\OrderArticle {}
|
class d3_dev_oxorderarticle_parent extends \OxidEsales\Eshop\Application\Model\OrderArticle {}
|
||||||
|
|
||||||
/**
|
|
||||||
* Class d3_dev_oxemail_parent
|
|
||||||
*/
|
|
||||||
class d3_dev_oxemail_parent extends \OxidEsales\Eshop\Core\Email {}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class d3_dev_order_parent
|
|
||||||
*/
|
|
||||||
class d3_dev_order_parent extends \OxidEsales\Eshop\Application\Controller\OrderController {}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Class d3_dev_oxbasket_parent
|
|
||||||
*/
|
|
||||||
class d3_dev_oxbasket_parent extends \OxidEsales\Eshop\Application\Model\Basket {}
|
class d3_dev_oxbasket_parent extends \OxidEsales\Eshop\Application\Model\Basket {}
|
||||||
|
|
||||||
/**
|
|
||||||
* Class d3_dev_oxbasketitem_parent
|
|
||||||
*/
|
|
||||||
class d3_dev_oxbasketitem_parent extends \OxidEsales\Eshop\Application\Model\BasketItem {}
|
class d3_dev_oxbasketitem_parent extends \OxidEsales\Eshop\Application\Model\BasketItem {}
|
||||||
|
|
||||||
|
class d3_dev_order_parent extends \OxidEsales\Eshop\Application\Controller\OrderController {}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace D3\Devhelper\Modules\Core
|
||||||
|
{
|
||||||
|
class d3_dev_oxemail_parent extends \OxidEsales\Eshop\Core\Email {}
|
||||||
|
}
|
@ -3,7 +3,15 @@
|
|||||||
namespace D3\Devhelper\Modules\Application\Controller;
|
namespace D3\Devhelper\Modules\Application\Controller;
|
||||||
|
|
||||||
// .../?cl=thankyou[&d3orderid=23]
|
// .../?cl=thankyou[&d3orderid=23]
|
||||||
|
use D3\Devhelper\Modules\Application\Model\d3_dev_d3inquiry;
|
||||||
|
use D3\Devhelper\Modules\Application\Model\d3_dev_oxorder;
|
||||||
|
use OxidEsales\Eshop\Application\Model\Order;
|
||||||
|
use OxidEsales\Eshop\Application\Model\User;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\UserException;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
|
use OxidEsales\Eshop\Core\Request;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This Software is the property of Data Development and is protected
|
* This Software is the property of Data Development and is protected
|
||||||
@ -16,17 +24,15 @@ use OxidEsales\Eshop\Core\Registry;
|
|||||||
* http://www.shopmodule.com
|
* http://www.shopmodule.com
|
||||||
*
|
*
|
||||||
* @copyright © D³ Data Development, Thomas Dartsch
|
* @copyright © D³ Data Development, Thomas Dartsch
|
||||||
* @author D³ Data Development - Daniel Seifert <ds@shopmodule.com>
|
* @author D³ Data Development - Daniel Seifert <info@shopmodule.com>
|
||||||
* @link http://www.oxidmodule.com
|
* @link http://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class d3_dev_thankyou extends d3_dev_thankyou_parent
|
class d3_dev_thankyou extends d3_dev_thankyou_parent
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
* @throws DatabaseConnectionException
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
|
* @throws DatabaseErrorException
|
||||||
* @throws object
|
|
||||||
* @throws oxUserException
|
|
||||||
*/
|
*/
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
@ -36,8 +42,8 @@ class d3_dev_thankyou extends d3_dev_thankyou_parent
|
|||||||
|
|
||||||
Registry::getSession()->setVariable('sess_challenge', $sSessChallenge);
|
Registry::getSession()->setVariable('sess_challenge', $sSessChallenge);
|
||||||
|
|
||||||
if (oxNew(\OxidEsales\Eshop\Core\Request::class)->getRequestParameter('d3dev')
|
if (Registry::get(Request::class)->getRequestEscapedParameter("d3dev")
|
||||||
&& false == (bool) Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value
|
&& false == (bool) Registry::getConfig()->getActiveShop()->isProductiveMode()
|
||||||
&& Registry::getConfig()->getConfigParam('blD3DevShowThankyou')
|
&& Registry::getConfig()->getConfigParam('blD3DevShowThankyou')
|
||||||
) {
|
) {
|
||||||
$this->_d3authenticate();
|
$this->_d3authenticate();
|
||||||
@ -47,17 +53,11 @@ class d3_dev_thankyou extends d3_dev_thankyou_parent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @throws object
|
|
||||||
* @throws oxUserException
|
|
||||||
*/
|
|
||||||
protected function _d3authenticate ()
|
protected function _d3authenticate ()
|
||||||
{
|
{
|
||||||
$request = oxNew(\OxidEsales\Eshop\Core\Request::class);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$sUser = $request->getRequestParameter( 'usr' );
|
$sUser = Registry::get(Request::class)->getRequestEscapedParameter( 'usr');
|
||||||
$sPassword = $request->getRequestParameter( 'pwd' );
|
$sPassword = Registry::get(Request::class)->getRequestEscapedParameter('pwd');
|
||||||
|
|
||||||
if ( !$sUser || !$sPassword ) {
|
if ( !$sUser || !$sPassword ) {
|
||||||
$sUser = $_SERVER[ 'PHP_AUTH_USER' ];
|
$sUser = $_SERVER[ 'PHP_AUTH_USER' ];
|
||||||
@ -80,17 +80,17 @@ class d3_dev_thankyou extends d3_dev_thankyou_parent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/** @var \OxidEsales\Eshop\Application\Model\User $oUser */
|
/** @var User $oUser */
|
||||||
$oUser = oxNew( \OxidEsales\Eshop\Application\Model\User::class );
|
$oUser = oxNew(User::class);
|
||||||
if ( !$sUser || !$sPassword || !$oUser->login( $sUser, $sPassword ) ) {
|
if ( !$sUser || !$sPassword || !$oUser->login( $sUser, $sPassword ) ) {
|
||||||
/** @var \OxidEsales\Eshop\Core\Exception\UserException $oEx */
|
/** @var UserException $oEx */
|
||||||
$oEx = oxNew( \OxidEsales\Eshop\Core\Exception\UserException::class, 'EXCEPTION_USER_NOVALIDLOGIN');
|
$oEx = oxNew(UserException::class, 'EXCEPTION_USER_NOVALIDLOGIN');
|
||||||
throw $oEx;
|
throw $oEx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch ( Exception $oEx ) {
|
catch ( \Exception $oEx ) {
|
||||||
$oShop = Registry::getConfig()->getActiveShop();
|
$oShop = Registry::getConfig()->getActiveShop();
|
||||||
header( 'WWW-Authenticate: Basic realm="' . $oShop->oxshops__oxname->value . '"' );
|
header( 'WWW-Authenticate: Basic realm="{' . $oShop->getFieldData('oxname') . '"' );
|
||||||
header( 'HTTP/1.0 401 Unauthorized' );
|
header( 'HTTP/1.0 401 Unauthorized' );
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
@ -98,17 +98,17 @@ class d3_dev_thankyou extends d3_dev_thankyou_parent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool|d3_dev_oxorder
|
* @return bool|d3_dev_oxorder
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
* @throws DatabaseConnectionException
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
|
* @throws DatabaseErrorException
|
||||||
*/
|
*/
|
||||||
public function d3GetLastOrder()
|
public function d3GetLastOrder()
|
||||||
{
|
{
|
||||||
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
|
if (Registry::getConfig()->getActiveShop()->isProductiveMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var d3_dev_oxorder $oOrder */
|
/** @var d3_dev_oxorder $oOrder */
|
||||||
$oOrder = oxNew(\OxidEsales\Eshop\Application\Model\Order::class);
|
$oOrder = oxNew(Order::class);
|
||||||
$oOrder->d3getLastOrder();
|
$oOrder->d3getLastOrder();
|
||||||
|
|
||||||
return $oOrder;
|
return $oOrder;
|
||||||
@ -116,11 +116,11 @@ class d3_dev_thankyou extends d3_dev_thankyou_parent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool|d3_dev_d3inquiry
|
* @return bool|d3_dev_d3inquiry
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
* @throws DatabaseConnectionException
|
||||||
*/
|
*/
|
||||||
public function d3GetLastInquiry()
|
public function d3GetLastInquiry()
|
||||||
{
|
{
|
||||||
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
|
if (Registry::getConfig()->getActiveShop()->isProductiveMode()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,8 +2,12 @@
|
|||||||
|
|
||||||
namespace D3\Devhelper\Modules\Application\Model;
|
namespace D3\Devhelper\Modules\Application\Model;
|
||||||
|
|
||||||
|
use OxidEsales\Eshop\Application\Model\Basket;
|
||||||
use OxidEsales\Eshop\Core\DatabaseProvider;
|
use OxidEsales\Eshop\Core\DatabaseProvider;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
|
use OxidEsales\Eshop\Core\Request;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This Software is the property of Data Development and is protected
|
* This Software is the property of Data Development and is protected
|
||||||
@ -16,7 +20,7 @@ use OxidEsales\Eshop\Core\Registry;
|
|||||||
* http://www.shopmodule.com
|
* http://www.shopmodule.com
|
||||||
*
|
*
|
||||||
* @copyright © D³ Data Development, Thomas Dartsch
|
* @copyright © D³ Data Development, Thomas Dartsch
|
||||||
* @author D³ Data Development - Daniel Seifert <ds@shopmodule.com>
|
* @author D³ Data Development - Daniel Seifert <info@shopmodule.com>
|
||||||
* @link http://www.oxidmodule.com
|
* @link http://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -26,12 +30,12 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return d3_dev_oxbasket
|
* @return d3_dev_oxbasket
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
* @throws DatabaseConnectionException
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
|
* @throws DatabaseErrorException
|
||||||
*/
|
*/
|
||||||
public function d3DevGetOrderBasket()
|
public function d3DevGetOrderBasket()
|
||||||
{
|
{
|
||||||
/** @var oxbasket $oBasket */
|
/** @var Basket $oBasket */
|
||||||
$this->_getInquiryBasket();
|
$this->_getInquiryBasket();
|
||||||
|
|
||||||
// unsetting bundles
|
// unsetting bundles
|
||||||
@ -53,11 +57,11 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
* @throws DatabaseConnectionException
|
||||||
*/
|
*/
|
||||||
public function d3getLastInquiryId()
|
public function d3getLastInquiryId()
|
||||||
{
|
{
|
||||||
$inquiryNr = (int) oxNew(\OxidEsales\Eshop\Core\Request::class)->getRequestParameter('d3inquirynr');
|
$inquiryNr = (int) Registry::get(Request::class)->getRequestEscapedParameter('d3inquirynr');
|
||||||
$sWhere = 1;
|
$sWhere = 1;
|
||||||
if ($inquiryNr) {
|
if ($inquiryNr) {
|
||||||
$sWhere = ' oxinquirynr = ' . $inquiryNr;
|
$sWhere = ' oxinquirynr = ' . $inquiryNr;
|
||||||
@ -69,7 +73,7 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
* @throws DatabaseConnectionException
|
||||||
*/
|
*/
|
||||||
public function d3getLastInquiry()
|
public function d3getLastInquiry()
|
||||||
{
|
{
|
||||||
@ -78,9 +82,9 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return oxBasket
|
* @return Basket
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
* @throws DatabaseConnectionException
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
|
* @throws DatabaseErrorException
|
||||||
*/
|
*/
|
||||||
public function getBasket()
|
public function getBasket()
|
||||||
{
|
{
|
||||||
@ -94,8 +98,8 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
* @throws DatabaseConnectionException
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
|
* @throws DatabaseErrorException
|
||||||
*/
|
*/
|
||||||
protected function _d3AddVouchers()
|
protected function _d3AddVouchers()
|
||||||
{
|
{
|
||||||
@ -115,14 +119,14 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
|
|||||||
*
|
*
|
||||||
* @param bool $blStockCheck perform stock check or not (default true)
|
* @param bool $blStockCheck perform stock check or not (default true)
|
||||||
*
|
*
|
||||||
* @return \OxidEsales\Eshop\Application\Model\Basket
|
* @return Basket
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
* @throws DatabaseConnectionException
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
|
* @throws DatabaseErrorException
|
||||||
*/
|
*/
|
||||||
protected function _getInquiryBasket($blStockCheck = true)
|
protected function _getInquiryBasket($blStockCheck = true)
|
||||||
{
|
{
|
||||||
/** @var \OxidEsales\Eshop\Application\Model\Basket _oOrderBasket */
|
/** @var Basket _oOrderBasket */
|
||||||
$this->_oOrderBasket = oxNew(\OxidEsales\Eshop\Application\Model\Basket::class);
|
$this->_oOrderBasket = oxNew(Basket::class);
|
||||||
$this->_oOrderBasket->enableSaveToDataBase(false);
|
$this->_oOrderBasket->enableSaveToDataBase(false);
|
||||||
|
|
||||||
//setting recalculation mode
|
//setting recalculation mode
|
||||||
@ -140,7 +144,7 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
|
|||||||
// setting basket currency order uses
|
// setting basket currency order uses
|
||||||
$aCurrencies = Registry::getConfig()->getCurrencyArray();
|
$aCurrencies = Registry::getConfig()->getCurrencyArray();
|
||||||
foreach ($aCurrencies as $oCur) {
|
foreach ($aCurrencies as $oCur) {
|
||||||
if ($oCur->name == $this->oxorder__oxcurrency->value) {
|
if ($oCur->name == $this->getFieldData('oxcurrency')) {
|
||||||
$oBasketCur = $oCur;
|
$oBasketCur = $oCur;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -150,8 +154,8 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
|
|||||||
$this->_oOrderBasket->setBasketCurrency($oBasketCur);
|
$this->_oOrderBasket->setBasketCurrency($oBasketCur);
|
||||||
|
|
||||||
// set basket card id and message
|
// set basket card id and message
|
||||||
$this->_oOrderBasket->setCardId($this->oxorder__oxcardid->value);
|
$this->_oOrderBasket->setCardId($this->getFieldData('oxcardid'));
|
||||||
$this->_oOrderBasket->setCardMessage($this->oxorder__oxcardtext->value);
|
$this->_oOrderBasket->setCardMessage($this->getFieldData('oxcardtext'));
|
||||||
|
|
||||||
if ($this->_blReloadDiscount) {
|
if ($this->_blReloadDiscount) {
|
||||||
$oDb = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC);
|
$oDb = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC);
|
||||||
@ -166,8 +170,8 @@ class d3_dev_d3inquiry extends d3_dev_d3inquiry_parent
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$this->_oOrderBasket->setDiscountCalcMode(false);
|
$this->_oOrderBasket->setDiscountCalcMode(false);
|
||||||
$this->_oOrderBasket->setVoucherDiscount($this->oxorder__oxvoucherdiscount->value);
|
$this->_oOrderBasket->setVoucherDiscount($this->getFieldData('oxvoucherdiscount'));
|
||||||
$this->_oOrderBasket->setTotalDiscount($this->oxorder__oxdiscount->value);
|
$this->_oOrderBasket->setTotalDiscount($this->getFieldData('oxdiscount'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->_oOrderBasket;
|
return $this->_oOrderBasket;
|
||||||
|
@ -10,16 +10,18 @@
|
|||||||
* http://www.shopmodule.com
|
* http://www.shopmodule.com
|
||||||
*
|
*
|
||||||
* @copyright © D³ Data Development, Thomas Dartsch
|
* @copyright © D³ Data Development, Thomas Dartsch
|
||||||
* @author D³ Data Development - Daniel Seifert <ds@shopmodule.com>
|
* @author D³ Data Development - Daniel Seifert <info@shopmodule.com>
|
||||||
* @link http://www.oxidmodule.com
|
* @link http://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace D3\Devhelper\Modules\Application\Model;
|
namespace D3\Devhelper\Modules\Application\Model;
|
||||||
|
|
||||||
|
use OxidEsales\Eshop\Application\Model\ArticleList;
|
||||||
|
|
||||||
class d3_dev_d3inquiryarticle extends d3_dev_d3inquiryarticle_parent
|
class d3_dev_d3inquiryarticle extends d3_dev_d3inquiryarticle_parent
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @return array
|
* @return null|ArticleList
|
||||||
*/
|
*/
|
||||||
public function getCustomerAlsoBoughtThisProducts()
|
public function getCustomerAlsoBoughtThisProducts()
|
||||||
{
|
{
|
||||||
@ -35,6 +37,6 @@ class d3_dev_d3inquiryarticle extends d3_dev_d3inquiryarticle_parent
|
|||||||
*/
|
*/
|
||||||
public function isBundle()
|
public function isBundle()
|
||||||
{
|
{
|
||||||
return ( bool ) $this->d3inquiryarticles__oxisbundle->value;
|
return ( bool ) $this->getFieldData('oxisbundle');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ use OxidEsales\Eshop\Core\Registry;
|
|||||||
* http://www.shopmodule.com
|
* http://www.shopmodule.com
|
||||||
*
|
*
|
||||||
* @copyright © D³ Data Development, Thomas Dartsch
|
* @copyright © D³ Data Development, Thomas Dartsch
|
||||||
* @author D³ Data Development - Daniel Seifert <ds@shopmodule.com>
|
* @author D³ Data Development - Daniel Seifert <info@shopmodule.com>
|
||||||
* @link http://www.oxidmodule.com
|
* @link http://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ class d3_dev_oxbasket extends d3_dev_oxbasket_parent
|
|||||||
{
|
{
|
||||||
public function deleteBasket()
|
public function deleteBasket()
|
||||||
{
|
{
|
||||||
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value
|
if (Registry::getConfig()->getActiveShop()->isProductiveMode()
|
||||||
|| false == Registry::getConfig()->getConfigParam('blD3DevAvoidDelBasket')
|
|| false == Registry::getConfig()->getConfigParam('blD3DevAvoidDelBasket')
|
||||||
) {
|
) {
|
||||||
parent::deleteBasket();
|
parent::deleteBasket();
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* http://www.shopmodule.com
|
* http://www.shopmodule.com
|
||||||
*
|
*
|
||||||
* @copyright © D³ Data Development, Thomas Dartsch
|
* @copyright © D³ Data Development, Thomas Dartsch
|
||||||
* @author D³ Data Development - Daniel Seifert <ds@shopmodule.com>
|
* @author D³ Data Development - Daniel Seifert <info@shopmodule.com>
|
||||||
* @link http://www.oxidmodule.com
|
* @link http://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -25,16 +25,16 @@ class d3_dev_oxbasketitem extends d3_dev_oxbasketitem_parent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \OxidEsales\EshopCommunity\Application\Model\oxArticleException
|
* @throws \OxidEsales\Eshop\Core\Exception\ArticleException
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\StandardException
|
* @throws \OxidEsales\Eshop\Core\Exception\ArticleInputException
|
||||||
* @throws oxNoArticleException
|
* @throws \OxidEsales\Eshop\Core\Exception\NoArticleException
|
||||||
*/
|
*/
|
||||||
public function getTitle()
|
public function getTitle()
|
||||||
{
|
{
|
||||||
$oArticle = $this->getArticle();
|
$oArticle = $this->getArticle();
|
||||||
$this->_sTitle = $oArticle->oxarticles__oxtitle->value;
|
$this->_sTitle = $oArticle->getFieldData('oxtitle');
|
||||||
|
|
||||||
if ($oArticle->oxarticles__oxvarselect->value) {
|
if ($oArticle->getFieldData('oxvarselect')) {
|
||||||
$this->_sTitle = $this->_sTitle . ', ' . $this->getVarSelect();
|
$this->_sTitle = $this->_sTitle . ', ' . $this->getVarSelect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,8 +2,14 @@
|
|||||||
|
|
||||||
namespace D3\Devhelper\Modules\Application\Model;
|
namespace D3\Devhelper\Modules\Application\Model;
|
||||||
|
|
||||||
|
use OxidEsales\Eshop\Application\Model\OrderArticle;
|
||||||
|
use OxidEsales\Eshop\Application\Model\Voucher;
|
||||||
use OxidEsales\Eshop\Core\DatabaseProvider;
|
use OxidEsales\Eshop\Core\DatabaseProvider;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\DatabaseConnectionException;
|
||||||
|
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
|
||||||
|
use OxidEsales\Eshop\Core\Model\ListModel;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
|
use OxidEsales\Eshop\Core\Request;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This Software is the property of Data Development and is protected
|
* This Software is the property of Data Development and is protected
|
||||||
@ -16,7 +22,7 @@ use OxidEsales\Eshop\Core\Registry;
|
|||||||
* http://www.shopmodule.com
|
* http://www.shopmodule.com
|
||||||
*
|
*
|
||||||
* @copyright © D³ Data Development, Thomas Dartsch
|
* @copyright © D³ Data Development, Thomas Dartsch
|
||||||
* @author D³ Data Development - Daniel Seifert <ds@shopmodule.com>
|
* @author D³ Data Development - Daniel Seifert <info@shopmodule.com>
|
||||||
* @link http://www.oxidmodule.com
|
* @link http://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -31,10 +37,10 @@ class d3_dev_oxorder extends d3_dev_oxorder_parent
|
|||||||
$oBasket = $this->_getOrderBasket();
|
$oBasket = $this->_getOrderBasket();
|
||||||
|
|
||||||
// unsetting bundles
|
// unsetting bundles
|
||||||
/** @var \OxidEsales\Eshop\Core\Model\ListModel $oOrderArticles */
|
/** @var ListModel $oOrderArticles */
|
||||||
$oOrderArticles = $this->getOrderArticles();
|
$oOrderArticles = $this->getOrderArticles();
|
||||||
foreach ($oOrderArticles as $sItemId => $oItem) {
|
foreach ($oOrderArticles as $sItemId => $oItem) {
|
||||||
/** @var $oItem \OxidEsales\Eshop\Application\Model\OrderArticle */
|
/** @var $oItem OrderArticle */
|
||||||
if ($oItem->isBundle()) {
|
if ($oItem->isBundle()) {
|
||||||
$oOrderArticles->offsetUnset($sItemId);
|
$oOrderArticles->offsetUnset($sItemId);
|
||||||
}
|
}
|
||||||
@ -53,11 +59,11 @@ class d3_dev_oxorder extends d3_dev_oxorder_parent
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return string
|
* @return string
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
* @throws DatabaseConnectionException
|
||||||
*/
|
*/
|
||||||
public function d3getLastOrderId()
|
public function d3getLastOrderId()
|
||||||
{
|
{
|
||||||
$orderNr = (int) oxNew(\OxidEsales\Eshop\Core\Request::class)->getRequestParameter('d3ordernr');
|
$orderNr = (int) Registry::get(Request::class)->getRequestEscapedParameter('d3ordernr');
|
||||||
$sWhere = 1;
|
$sWhere = 1;
|
||||||
if ($orderNr) {
|
if ($orderNr) {
|
||||||
$sWhere = ' oxordernr = ' . $orderNr;
|
$sWhere = ' oxordernr = ' . $orderNr;
|
||||||
@ -69,8 +75,8 @@ class d3_dev_oxorder extends d3_dev_oxorder_parent
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
* @throws DatabaseConnectionException
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
|
* @throws DatabaseErrorException
|
||||||
*/
|
*/
|
||||||
public function d3getLastOrder()
|
public function d3getLastOrder()
|
||||||
{
|
{
|
||||||
@ -93,8 +99,8 @@ class d3_dev_oxorder extends d3_dev_oxorder_parent
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseConnectionException
|
* @throws DatabaseConnectionException
|
||||||
* @throws \OxidEsales\Eshop\Core\Exception\DatabaseErrorException
|
* @throws DatabaseErrorException
|
||||||
*/
|
*/
|
||||||
protected function _d3AddVouchers()
|
protected function _d3AddVouchers()
|
||||||
{
|
{
|
||||||
@ -103,7 +109,7 @@ class d3_dev_oxorder extends d3_dev_oxorder_parent
|
|||||||
$aResult = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getAll($sSelect);
|
$aResult = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC)->getAll($sSelect);
|
||||||
|
|
||||||
foreach ($aResult as $aFields) {
|
foreach ($aResult as $aFields) {
|
||||||
$oVoucher = oxNew(\OxidEsales\Eshop\Application\Model\Voucher::class);
|
$oVoucher = oxNew(Voucher::class);
|
||||||
$oVoucher->load($aFields['oxid']);
|
$oVoucher->load($aFields['oxid']);
|
||||||
$this->_aVoucherList[$oVoucher->getId()] = $oVoucher;
|
$this->_aVoucherList[$oVoucher->getId()] = $oVoucher;
|
||||||
}
|
}
|
||||||
|
@ -10,16 +10,18 @@
|
|||||||
* http://www.shopmodule.com
|
* http://www.shopmodule.com
|
||||||
*
|
*
|
||||||
* @copyright © D³ Data Development, Thomas Dartsch
|
* @copyright © D³ Data Development, Thomas Dartsch
|
||||||
* @author D³ Data Development - Daniel Seifert <ds@shopmodule.com>
|
* @author D³ Data Development - Daniel Seifert <info@shopmodule.com>
|
||||||
* @link http://www.oxidmodule.com
|
* @link http://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace D3\Devhelper\Modules\Application\Model;
|
namespace D3\Devhelper\Modules\Application\Model;
|
||||||
|
|
||||||
|
use OxidEsales\Eshop\Application\Model\ArticleList;
|
||||||
|
|
||||||
class d3_dev_oxorderarticle extends d3_dev_oxorderarticle_parent
|
class d3_dev_oxorderarticle extends d3_dev_oxorderarticle_parent
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @return null|\OxidEsales\EshopCommunity\Application\Model\ArticleList
|
* @return null|ArticleList
|
||||||
*/
|
*/
|
||||||
public function getCustomerAlsoBoughtThisProducts()
|
public function getCustomerAlsoBoughtThisProducts()
|
||||||
{
|
{
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace D3\Devhelper\Modules\Core;
|
namespace D3\Devhelper\Modules\Core;
|
||||||
|
|
||||||
|
use D3\Devhelper\Modules\Application\Model as ModuleModel;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -15,22 +16,20 @@ use OxidEsales\Eshop\Core\Registry;
|
|||||||
* http://www.shopmodule.com
|
* http://www.shopmodule.com
|
||||||
*
|
*
|
||||||
* @copyright © D³ Data Development, Thomas Dartsch
|
* @copyright © D³ Data Development, Thomas Dartsch
|
||||||
* @author D³ Data Development - Daniel Seifert <ds@shopmodule.com>
|
* @author D³ Data Development - Daniel Seifert <info@shopmodule.com>
|
||||||
* @link http://www.oxidmodule.com
|
* @link http://www.oxidmodule.com
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class d3_dev_oxemail extends d3_dev_oxemail_parent
|
class d3_dev_oxemail extends d3_dev_oxemail_parent
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param d3_dev_oxorder $oOrder
|
* @param ModuleModel\d3_dev_oxorder $oOrder
|
||||||
*
|
|
||||||
* @param $sType
|
* @param $sType
|
||||||
*
|
|
||||||
* @return mixed|string
|
* @return mixed|string
|
||||||
*/
|
*/
|
||||||
public function d3GetOrderMailContent($oOrder, $sType)
|
public function d3GetOrderMailContent($oOrder, $sType)
|
||||||
{
|
{
|
||||||
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
|
if (Registry::getConfig()->getActiveShop()->isProductiveMode()) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,7 +63,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
|||||||
|
|
||||||
// send confirmation to shop owner
|
// send confirmation to shop owner
|
||||||
// send not pretending from order user, as different email domain rise spam filters
|
// send not pretending from order user, as different email domain rise spam filters
|
||||||
$this->setFrom($oShop->oxshops__oxowneremail->value);
|
$this->setFrom($oShop->getFieldData('oxowneremail'));
|
||||||
|
|
||||||
$oLang = Registry::getLang();
|
$oLang = Registry::getLang();
|
||||||
$iOrderLang = $oLang->getObjectTplLanguage();
|
$iOrderLang = $oLang->getObjectTplLanguage();
|
||||||
@ -78,7 +77,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
|||||||
$this->setSmtp($oShop);
|
$this->setSmtp($oShop);
|
||||||
|
|
||||||
// create messages
|
// create messages
|
||||||
/** @var Smarty $oSmarty */
|
/** @var \Smarty $oSmarty */
|
||||||
$oSmarty = $this->_getSmarty();
|
$oSmarty = $this->_getSmarty();
|
||||||
$this->setViewData("order", $oOrder);
|
$this->setViewData("order", $oOrder);
|
||||||
|
|
||||||
@ -89,7 +88,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param d3_dev_d3inquiry $oInquiry
|
* @param ModuleModel\d3_dev_d3inquiry $oInquiry
|
||||||
*
|
*
|
||||||
* @param $sType
|
* @param $sType
|
||||||
*
|
*
|
||||||
@ -97,7 +96,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
|||||||
*/
|
*/
|
||||||
public function d3GetInquiryMailContent($oInquiry, $sType)
|
public function d3GetInquiryMailContent($oInquiry, $sType)
|
||||||
{
|
{
|
||||||
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
|
if (Registry::getConfig()->getActiveShop()->isProductiveMode()) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,7 +130,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
|||||||
|
|
||||||
// send confirmation to shop owner
|
// send confirmation to shop owner
|
||||||
// send not pretending from order user, as different email domain rise spam filters
|
// send not pretending from order user, as different email domain rise spam filters
|
||||||
$this->setFrom($oShop->oxshops__oxowneremail->value);
|
$this->setFrom($oShop->getFieldData('oxowneremail'));
|
||||||
|
|
||||||
$oLang = Registry::getLang();
|
$oLang = Registry::getLang();
|
||||||
$iOrderLang = $oLang->getObjectTplLanguage();
|
$iOrderLang = $oLang->getObjectTplLanguage();
|
||||||
@ -145,7 +144,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
|||||||
$this->setSmtp($oShop);
|
$this->setSmtp($oShop);
|
||||||
|
|
||||||
// create messages
|
// create messages
|
||||||
/** @var Smarty $oSmarty */
|
/** @var \Smarty $oSmarty */
|
||||||
$oSmarty = $this->_getSmarty();
|
$oSmarty = $this->_getSmarty();
|
||||||
$this->setViewData("inquiry", $oInquiry);
|
$this->setViewData("inquiry", $oInquiry);
|
||||||
|
|
||||||
@ -157,7 +156,7 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
|||||||
|
|
||||||
protected function _sendMail()
|
protected function _sendMail()
|
||||||
{
|
{
|
||||||
if (Registry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
|
if (Registry::getConfig()->getActiveShop()->isProductiveMode()) {
|
||||||
return parent::_sendMail();
|
return parent::_sendMail();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,7 +187,6 @@ class d3_dev_oxemail extends d3_dev_oxemail_parent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->_aRecipients = $aRecipients;
|
$this->_aRecipients = $aRecipients;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ use OxidEsales\Eshop\Core\Registry;
|
|||||||
*/
|
*/
|
||||||
$sMetadataVersion = '2.0';
|
$sMetadataVersion = '2.0';
|
||||||
|
|
||||||
$sStyle = class_exists('d3dev') ? "background-color: darkred; color: white; padding: 0 10px;" : "";
|
$sStyle = class_exists(D3\Devhelper\Application\Controller\d3dev::class) ? "background-color: darkred; color: white; padding: 0 10px;" : "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Module information
|
* Module information
|
||||||
@ -22,12 +22,12 @@ $aModule = array(
|
|||||||
'id' => 'd3dev',
|
'id' => 'd3dev',
|
||||||
'title' =>
|
'title' =>
|
||||||
(class_exists(D3\ModCfg\Application\Model\d3utils::class) ? D3\ModCfg\Application\Model\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>',
|
' <span style="'.$sStyle.';">TPL Development Tool</span>',
|
||||||
'description' => array(
|
'description' => array(
|
||||||
'de' => '<script type="text/javascript"><!--
|
'de' => '<script type="text/javascript"><!--
|
||||||
function showNote() {
|
function showNote() {
|
||||||
var _oElem = document.getElementById("secnote");
|
var _oElem = document.getElementById("secnote");
|
||||||
if (_oElem.style.display == "block") {
|
if (_oElem.style.display === "block") {
|
||||||
_oElem.style.display = "none";
|
_oElem.style.display = "none";
|
||||||
} else {
|
} else {
|
||||||
_oElem.style.display = "block";
|
_oElem.style.display = "block";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user