diff --git a/src/Modules/Application/Controller/d3_dev_thankyou.php b/src/Modules/Application/Controller/d3_dev_thankyou.php index 89fc95c..22dc800 100644 --- a/src/Modules/Application/Controller/d3_dev_thankyou.php +++ b/src/Modules/Application/Controller/d3_dev_thankyou.php @@ -40,7 +40,12 @@ class d3_dev_thankyou extends d3_dev_thankyou_parent parent::init(); - Registry::getSession()->setVariable('sess_challenge', $sSessChallenge); + if (Registry::get(Request::class)->getRequestEscapedParameter("d3dev") + && false == (bool) Registry::getConfig()->getActiveShop()->isProductiveMode() + && Registry::getConfig()->getConfigParam('blD3DevAvoidDelBasket') + ) { + Registry::getSession()->setVariable( 'sess_challenge', $sSessChallenge ); + } if (Registry::get(Request::class)->getRequestEscapedParameter("d3dev") && false == (bool) Registry::getConfig()->getActiveShop()->isProductiveMode() @@ -96,6 +101,27 @@ class d3_dev_thankyou extends d3_dev_thankyou_parent } } + /** + * @return bool|d3_dev_oxorder|\oxOrder + * @throws DatabaseConnectionException + * @throws DatabaseErrorException + */ + public function getOrder() + { + $oOrder = parent::getOrder(); + + if ((false == $oOrder || !$oOrder->getFieldData('oxordernr')) + && Registry::get(Request::class)->getRequestEscapedParameter("d3dev") + && false == (bool) Registry::getConfig()->getActiveShop()->isProductiveMode() + && Registry::getConfig()->getConfigParam('blD3DevShowThankyou') + ) { + $this->_oOrder = $this->d3GetLastOrder(); + $oOrder = $this->_oOrder; + } + + return $oOrder; + } + /** * @return bool|d3_dev_oxorder * @throws DatabaseConnectionException