prevent thankyou redirect in case of missing order
This commit is contained in:
parent
bf9bd60921
commit
ef589ee8a3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user