This commit is contained in:
2017-05-30 16:00:47 +02:00
parent 39d5de8448
commit f1369d0b4d
11 changed files with 559 additions and 559 deletions

View File

@ -1,47 +1,47 @@
<?php <?php
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
* *
* Any unauthorized use of this software without a valid license * Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by * is a violation of the license agreement and will be prosecuted by
* civil and criminal law. * civil and criminal law.
* *
* http://www.shopmodule.com * http://www.shopmodule.com
* *
* @copyright <20> D<> Data Development, Thomas Dartsch * @copyright <20> D<> Data Development, Thomas Dartsch
* @author D<> Data Development - Daniel Seifert <ds@shopmodule.com> * @author D<> Data Development - Daniel Seifert <ds@shopmodule.com>
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
class d3_dev_thankyou_parent extends thankyou {} class d3_dev_thankyou_parent extends thankyou {}
/** /**
* Class d3_dev_oxorder_parent * Class d3_dev_oxorder_parent
*/ */
class d3_dev_oxorder_parent extends oxorder {} class d3_dev_oxorder_parent extends oxorder {}
/** /**
* Class d3_dev_oxorderarticle * Class d3_dev_oxorderarticle
*/ */
class d3_dev_oxorderarticle_parent extends oxOrderArticle {} class d3_dev_oxorderarticle_parent extends oxOrderArticle {}
/** /**
* Class d3_dev_oxemail_parent * Class d3_dev_oxemail_parent
*/ */
class d3_dev_oxemail_parent extends oxemail {} class d3_dev_oxemail_parent extends oxemail {}
/** /**
* Class d3_dev_order_parent * Class d3_dev_order_parent
*/ */
class d3_dev_order_parent extends order {} class d3_dev_order_parent extends order {}
/** /**
* Class d3_dev_oxbasket_parent * Class d3_dev_oxbasket_parent
*/ */
class d3_dev_oxbasket_parent extends oxbasket {} class d3_dev_oxbasket_parent extends oxbasket {}
/** /**
* Class d3_dev_oxbasketitem_parent * Class d3_dev_oxbasketitem_parent
*/ */
class d3_dev_oxbasketitem_parent extends oxBasketItem {} class d3_dev_oxbasketitem_parent extends oxBasketItem {}

View File

@ -1,38 +1,38 @@
<?php <?php
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
* *
* Any unauthorized use of this software without a valid license * Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by * is a violation of the license agreement and will be prosecuted by
* civil and criminal law. * civil and criminal law.
* *
* http://www.shopmodule.com * http://www.shopmodule.com
* *
* @copyright <20> D<> Data Development, Thomas Dartsch * @copyright <20> D<> Data Development, Thomas Dartsch
* @author D<> Data Development - Daniel Seifert <ds@shopmodule.com> * @author D<> Data Development - Daniel Seifert <ds@shopmodule.com>
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
class d3dev extends oxUBase class d3dev extends oxUBase
{ {
public function showOrderMailContent() public function showOrderMailContent()
{ {
if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value
|| false == oxRegistry::getConfig()->getConfigParam('blD3DevShowOrderMailsInBrowser') || false == oxRegistry::getConfig()->getConfigParam('blD3DevShowOrderMailsInBrowser')
) { ) {
oxRegistry::getUtils()->redirect(oxRegistry::getConfig()->getShopUrl().'index.php?cl=start'); oxRegistry::getUtils()->redirect(oxRegistry::getConfig()->getShopUrl().'index.php?cl=start');
} }
$sTpl = oxRegistry::getConfig()->getRequestParameter('type'); $sTpl = oxRegistry::getConfig()->getRequestParameter('type');
/** @var d3_dev_thankyou $oThankyou */ /** @var d3_dev_thankyou $oThankyou */
$oThankyou = oxNew('thankyou'); $oThankyou = oxNew('thankyou');
$oOrder = $oThankyou->d3GetLastOrder(); $oOrder = $oThankyou->d3GetLastOrder();
/** @var d3_dev_oxemail $oEmail */ /** @var d3_dev_oxemail $oEmail */
$oEmail = oxNew('oxemail'); $oEmail = oxNew('oxemail');
echo $oEmail->d3GetOrderMailContent($oOrder, $sTpl); echo $oEmail->d3GetOrderMailContent($oOrder, $sTpl);
die(); die();
} }
} }

View File

@ -1,82 +1,82 @@
<?php <?php
/** /**
* Metadata version * Metadata version
*/ */
$sMetadataVersion = '1.1'; $sMetadataVersion = '1.1';
$sStyle = class_exists('d3dev') ? "background-color: darkred; color: white; padding: 0 10px;" : ""; $sStyle = class_exists('d3dev') ? "background-color: darkred; color: white; padding: 0 10px;" : "";
/** /**
* Module information * Module information
*/ */
$aModule = array( $aModule = array(
'id' => 'd3dev', 'id' => 'd3dev',
'title' => 'title' =>
(class_exists('d3utils') ? d3utils::getInstance()->getD3Logo() : 'D&sup3;') . (class_exists('d3utils') ? d3utils::getInstance()->getD3Logo() : 'D&sup3;') .
' <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";
} }
} }
--></script> --></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="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> <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 WKs nach Bestellabschluss</li>'. <ul><li>unterbindet L&ouml;schen des WKs nach Bestellabschluss</li>'.
'<li><a style="text-decoration: underline;" href="'.oxRegistry::getConfig()->getCurrentShopUrl(false).'index.php?cl=thankyou&d3dev=1&d3ordernr=" target="_new">Thankyou ist ohne Bestellung aufrufbar</a></li>'. '<li><a style="text-decoration: underline;" href="'.oxRegistry::getConfig()->getCurrentShopUrl(false).'index.php?cl=thankyou&d3dev=1&d3ordernr=" target="_new">Thankyou ist ohne Bestellung aufrufbar</a></li>'.
'<li>Mail-Templates k&ouml;nnen im Browser ausgegeben werden'. '<li>Mail-Templates k&ouml;nnen im Browser ausgegeben werden'.
'<ul>'. '<ul>'.
'<li><a style="text-decoration: underline;" href="'.oxRegistry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showOrderMailContent&type=owner_html&d3ordernr=" target="_new">Owner HTML</a></li>'. '<li><a style="text-decoration: underline;" href="'.oxRegistry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showOrderMailContent&type=owner_html&d3ordernr=" target="_new">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">Owner Plain</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">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">User HTML</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">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">User Plain</a></li></ul>'. '<li><a style="text-decoration: underline;" href="'.oxRegistry::getConfig()->getCurrentShopUrl(false).'index.php?cl=d3dev&fnc=showOrderMailContent&type=user_plain&d3ordernr=" target="_new">User Plain</a></li></ul>'.
'</li></ul>Jede dieser Optionen muss aus Sicherheitsgr&uuml;nden unter "Einstell." aktiviert werden. Weiterhin darf der Shop nicht im Produktivmodus betrieben werden.', '</li></ul>Jede dieser Optionen muss aus Sicherheitsgr&uuml;nden unter "Einstell." aktiviert werden. Weiterhin darf der Shop nicht im Produktivmodus betrieben werden.',
'en' => ''), 'en' => ''),
// 'thumbnail' => 'picture.png', // 'thumbnail' => 'picture.png',
'version' => '0.1', 'version' => '0.1',
'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)', 'author' => 'D&sup3; Data Development (Inh.: Thomas Dartsch)',
'email' => 'support@shopmodule.com', 'email' => 'support@shopmodule.com',
'url' => 'http://www.oxidmodule.com/', 'url' => 'http://www.oxidmodule.com/',
'extend' => array( 'extend' => array(
'thankyou' => 'd3/d3dev/modules/controllers/d3_dev_thankyou', 'thankyou' => 'd3/d3dev/modules/controllers/d3_dev_thankyou',
'oxorder' => 'd3/d3dev/modules/models/d3_dev_oxorder', 'oxorder' => 'd3/d3dev/modules/models/d3_dev_oxorder',
'oxorderarticle' => 'd3/d3dev/modules/models/d3_dev_oxorderarticle', 'oxorderarticle' => 'd3/d3dev/modules/models/d3_dev_oxorderarticle',
'oxemail' => 'd3/d3dev/modules/models/d3_dev_oxemail', 'oxemail' => 'd3/d3dev/modules/models/d3_dev_oxemail',
'oxbasket' => 'd3/d3dev/modules/models/d3_dev_oxbasket', 'oxbasket' => 'd3/d3dev/modules/models/d3_dev_oxbasket',
'oxbasketitem' => 'd3/d3dev/modules/models/d3_dev_oxbasketitem', 'oxbasketitem' => 'd3/d3dev/modules/models/d3_dev_oxbasketitem',
), ),
'files' => array( 'files' => array(
'd3dev' => 'd3/d3dev/controllers/d3dev.php', 'd3dev' => 'd3/d3dev/controllers/d3dev.php',
), ),
'templates' => array( 'templates' => array(
), ),
'events' => array( 'events' => array(
), ),
'blocks' => array( 'blocks' => array(
), ),
'settings' => array( 'settings' => array(
array( array(
'group' => 'd3dev_order', 'group' => 'd3dev_order',
'name' => 'blD3DevAvoidDelBasket', 'name' => 'blD3DevAvoidDelBasket',
'type' => 'bool', 'type' => 'bool',
'value' => 'false' 'value' => 'false'
), ),
array( array(
'group' => 'd3dev_order', 'group' => 'd3dev_order',
'name' => 'blD3DevShowThankyou', 'name' => 'blD3DevShowThankyou',
'type' => 'bool', 'type' => 'bool',
'value' => 'false' 'value' => 'false'
), ),
array( array(
'group' => 'd3dev_mail', 'group' => 'd3dev_mail',
'name' => 'blD3DevShowOrderMailsInBrowser', 'name' => 'blD3DevShowOrderMailsInBrowser',
'type' => 'bool', 'type' => 'bool',
'value' => 'false' 'value' => 'false'
), ),
), ),
); );

View File

@ -1,55 +1,55 @@
<?php <?php
// .../?cl=thankyou[&d3orderid=23] // .../?cl=thankyou[&d3orderid=23]
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
* *
* Any unauthorized use of this software without a valid license * Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by * is a violation of the license agreement and will be prosecuted by
* civil and criminal law. * civil and criminal law.
* *
* http://www.shopmodule.com * http://www.shopmodule.com
* *
* @copyright <20> D<> Data Development, Thomas Dartsch * @copyright <20> D<> Data Development, Thomas Dartsch
* @author D<> Data Development - Daniel Seifert <ds@shopmodule.com> * @author D<> Data Development - Daniel Seifert <ds@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
{ {
public function init() public function init()
{ {
$sSessChallenge = oxRegistry::getSession()->getVariable('sess_challenge'); $sSessChallenge = oxRegistry::getSession()->getVariable('sess_challenge');
parent::init(); parent::init();
oxRegistry::getSession()->setVariable('sess_challenge', $sSessChallenge); oxRegistry::getSession()->setVariable('sess_challenge', $sSessChallenge);
if (oxRegistry::getConfig()->getRequestParameter('d3dev') if (oxRegistry::getConfig()->getRequestParameter('d3dev')
&& false == (bool) oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value && false == (bool) oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value
&& oxRegistry::getConfig()->getConfigParam('blD3DevShowThankyou') && oxRegistry::getConfig()->getConfigParam('blD3DevShowThankyou')
) { ) {
$oOrder = $this->d3GetLastOrder(); $oOrder = $this->d3GetLastOrder();
$oBasket = $oOrder->d3DevGetOrderBasket(); $oBasket = $oOrder->d3DevGetOrderBasket();
$this->_oBasket = $oBasket; $this->_oBasket = $oBasket;
} }
} }
/** /**
* @return d3_dev_oxorder * @return d3_dev_oxorder
*/ */
public function d3GetLastOrder() public function d3GetLastOrder()
{ {
if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value) { if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
return false; return false;
} }
/** @var d3_dev_oxorder $oOrder */ /** @var d3_dev_oxorder $oOrder */
$oOrder = oxNew('oxorder'); $oOrder = oxNew('oxorder');
$oOrder->d3getLastOrder(); $oOrder->d3getLastOrder();
return $oOrder; return $oOrder;
} }
} }

View File

@ -1,59 +1,59 @@
<?php <?php
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
* *
* Any unauthorized use of this software without a valid license * Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by * is a violation of the license agreement and will be prosecuted by
* civil and criminal law. * civil and criminal law.
* *
* http://www.shopmodule.com * http://www.shopmodule.com
* *
* @copyright <20> D<> Data Development, Thomas Dartsch * @copyright <20> D<> Data Development, Thomas Dartsch
* @author D<> Data Development - Daniel Seifert <ds@shopmodule.com> * @author D<> Data Development - Daniel Seifert <ds@shopmodule.com>
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
class d3_dev_oxbasket extends d3_dev_oxbasket_parent class d3_dev_oxbasket extends d3_dev_oxbasket_parent
{ {
public function deleteBasket() public function deleteBasket()
{ {
if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value
|| false == oxRegistry::getConfig()->getConfigParam('blD3DevAvoidDelBasket') || false == oxRegistry::getConfig()->getConfigParam('blD3DevAvoidDelBasket')
) { ) {
parent::deleteBasket(); parent::deleteBasket();
} }
// else do nothing; // else do nothing;
} }
public function d3ClearBasketItemArticles() public function d3ClearBasketItemArticles()
{ {
/** @var d3_dev_oxbasketitem $oBasketItem */ /** @var d3_dev_oxbasketitem $oBasketItem */
foreach ($this->_aBasketContents as $oBasketItem) { foreach ($this->_aBasketContents as $oBasketItem) {
$oBasketItem->d3ClearArticle(); $oBasketItem->d3ClearArticle();
} }
} }
/** /**
* Calculates total basket discount value. * Calculates total basket discount value.
*/ */
protected function _calcBasketTotalDiscount() protected function _calcBasketTotalDiscount()
{ {
if ($this->_oTotalDiscount === null || (!$this->isAdmin())) { if ($this->_oTotalDiscount === null || (!$this->isAdmin())) {
$this->_oTotalDiscount = $this->_getPriceObject(); $this->_oTotalDiscount = $this->_getPriceObject();
if (is_array($this->_aDiscounts)) { if (is_array($this->_aDiscounts)) {
foreach ($this->_aDiscounts as $oDiscount) { foreach ($this->_aDiscounts as $oDiscount) {
// skipping bundle discounts // skipping bundle discounts
if ($oDiscount->sType == 'itm') { if ($oDiscount->sType == 'itm') {
continue; continue;
} }
// add discount value to total basket discount // add discount value to total basket discount
$this->_oTotalDiscount->add($oDiscount->dDiscount); $this->_oTotalDiscount->add($oDiscount->dDiscount);
} }
} }
} }
} }
} }

View File

@ -1,23 +1,23 @@
<?php <?php
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
* *
* Any unauthorized use of this software without a valid license * Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by * is a violation of the license agreement and will be prosecuted by
* civil and criminal law. * civil and criminal law.
* *
* http://www.shopmodule.com * http://www.shopmodule.com
* *
* @copyright <20> D<> Data Development, Thomas Dartsch * @copyright <20> D<> Data Development, Thomas Dartsch
* @author D<> Data Development - Daniel Seifert <ds@shopmodule.com> * @author D<> Data Development - Daniel Seifert <ds@shopmodule.com>
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
class d3_dev_oxbasketitem extends d3_dev_oxbasketitem_parent class d3_dev_oxbasketitem extends d3_dev_oxbasketitem_parent
{ {
public function d3ClearArticle() public function d3ClearArticle()
{ {
$this->_oArticle = null; $this->_oArticle = null;
} }
} }

View File

@ -1,82 +1,82 @@
<?php <?php
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
* *
* Any unauthorized use of this software without a valid license * Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by * is a violation of the license agreement and will be prosecuted by
* civil and criminal law. * civil and criminal law.
* *
* http://www.shopmodule.com * http://www.shopmodule.com
* *
* @copyright <20> D<> Data Development, Thomas Dartsch * @copyright <20> D<> Data Development, Thomas Dartsch
* @author D<> Data Development - Daniel Seifert <ds@shopmodule.com> * @author D<> Data Development - Daniel Seifert <ds@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 d3_dev_oxorder $oOrder
* *
* @return mixed|string * @return mixed|string
*/ */
public function d3GetOrderMailContent($oOrder, $sType) public function d3GetOrderMailContent($oOrder, $sType)
{ {
if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value) { if (oxRegistry::getConfig()->getActiveShop()->oxshops__oxproductive->value) {
return ''; return '';
} }
switch (strtolower($sType)) { switch (strtolower($sType)) {
case 'owner_html': case 'owner_html':
$sTpl = $this->_sOrderOwnerTemplate; $sTpl = $this->_sOrderOwnerTemplate;
break; break;
case 'owner_plain': case 'owner_plain':
$sTpl = $this->_sOrderOwnerPlainTemplate; $sTpl = $this->_sOrderOwnerPlainTemplate;
break; break;
case 'user_plain': case 'user_plain':
$sTpl = $this->_sOrderUserPlainTemplate; $sTpl = $this->_sOrderUserPlainTemplate;
break; break;
case 'user_html': case 'user_html':
default: default:
$sTpl = $this->_sOrderUserTemplate; $sTpl = $this->_sOrderUserTemplate;
} }
$myConfig = $this->getConfig(); $myConfig = $this->getConfig();
$oShop = $this->_getShop(); $oShop = $this->_getShop();
// cleanup // cleanup
$this->_clearMailer(); $this->_clearMailer();
// add user defined stuff if there is any // add user defined stuff if there is any
$oOrder = $this->_addUserInfoOrderEMail($oOrder); $oOrder = $this->_addUserInfoOrderEMail($oOrder);
$oUser = $oOrder->getOrderUser(); $oUser = $oOrder->getOrderUser();
$this->setUser($oUser); $this->setUser($oUser);
// 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->oxshops__oxowneremail->value);
$oLang = oxRegistry::getLang(); $oLang = oxRegistry::getLang();
$iOrderLang = $oLang->getObjectTplLanguage(); $iOrderLang = $oLang->getObjectTplLanguage();
// if running shop language is different from admin lang. set in config // if running shop language is different from admin lang. set in config
// we have to load shop in config language // we have to load shop in config language
if ($oShop->getLanguage() != $iOrderLang) { if ($oShop->getLanguage() != $iOrderLang) {
$oShop = $this->_getShop($iOrderLang); $oShop = $this->_getShop($iOrderLang);
} }
$this->setSmtp($oShop); $this->setSmtp($oShop);
// create messages // create messages
$oSmarty = $this->_getSmarty(); $oSmarty = $this->_getSmarty();
$this->setViewData("order", $oOrder); $this->setViewData("order", $oOrder);
// Process view data array through oxoutput processor // Process view data array through oxoutput processor
$this->_processViewArray(); $this->_processViewArray();
return $oSmarty->fetch($myConfig->getTemplatePath($sTpl, false)); return $oSmarty->fetch($myConfig->getTemplatePath($sTpl, false));
} }
} }

View File

@ -1,94 +1,94 @@
<?php <?php
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
* *
* Any unauthorized use of this software without a valid license * Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by * is a violation of the license agreement and will be prosecuted by
* civil and criminal law. * civil and criminal law.
* *
* http://www.shopmodule.com * http://www.shopmodule.com
* *
* @copyright <20> D<> Data Development, Thomas Dartsch * @copyright <20> D<> Data Development, Thomas Dartsch
* @author D<> Data Development - Daniel Seifert <ds@shopmodule.com> * @author D<> Data Development - Daniel Seifert <ds@shopmodule.com>
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
class d3_dev_oxorder extends d3_dev_oxorder_parent class d3_dev_oxorder extends d3_dev_oxorder_parent
{ {
/** /**
* @return d3_dev_oxbasket * @return d3_dev_oxbasket
*/ */
public function d3DevGetOrderBasket() public function d3DevGetOrderBasket()
{ {
/** @var d3_dev_oxbasket $oBasket */ /** @var d3_dev_oxbasket $oBasket */
$oBasket = $this->_getOrderBasket(); $oBasket = $this->_getOrderBasket();
// unsetting bundles // unsetting bundles
$oOrderArticles = $this->getOrderArticles(); $oOrderArticles = $this->getOrderArticles();
foreach ($oOrderArticles as $sItemId => $oItem) { foreach ($oOrderArticles as $sItemId => $oItem) {
if ($oItem->isBundle()) { if ($oItem->isBundle()) {
$oOrderArticles->offsetUnset($sItemId); $oOrderArticles->offsetUnset($sItemId);
} }
} }
// add this order articles to basket and recalculate basket // add this order articles to basket and recalculate basket
$this->_addOrderArticlesToBasket($oBasket, $oOrderArticles); $this->_addOrderArticlesToBasket($oBasket, $oOrderArticles);
// recalculating basket // recalculating basket
$oBasket->calculateBasket(true); $oBasket->calculateBasket(true);
$oBasket->d3ClearBasketItemArticles(); $oBasket->d3ClearBasketItemArticles();
$this->_oPayment = $this->_setPayment($oBasket->getPaymentId()); $this->_oPayment = $this->_setPayment($oBasket->getPaymentId());
return $oBasket; return $oBasket;
} }
/** /**
* @return string * @return string
*/ */
public function d3getLastOrderId() public function d3getLastOrderId()
{ {
if (oxRegistry::getConfig()->getRequestParameter('d3ordernr')) { if (oxRegistry::getConfig()->getRequestParameter('d3ordernr')) {
$sWhere = ' oxordernr = ' . (int) oxRegistry::getConfig()->getRequestParameter('d3ordernr'); $sWhere = ' oxordernr = ' . (int) oxRegistry::getConfig()->getRequestParameter('d3ordernr');
} else { } else {
$sWhere = 1; $sWhere = 1;
} }
$sSelect = "SELECT oxid FROM ".getViewName('oxorder')." WHERE ".$sWhere." ORDER BY oxorderdate DESC LIMIT 1"; $sSelect = "SELECT oxid FROM ".getViewName('oxorder')." WHERE ".$sWhere." ORDER BY oxorderdate DESC LIMIT 1";
return oxDb::getDb(oxDb::FETCH_MODE_ASSOC)->getOne($sSelect); return oxDb::getDb(oxDb::FETCH_MODE_ASSOC)->getOne($sSelect);
} }
public function d3getLastOrder() public function d3getLastOrder()
{ {
$this->load($this->d3getLastOrderId()); $this->load($this->d3getLastOrderId());
$this->_d3AddVouchers(); $this->_d3AddVouchers();
} }
/** /**
* @return oxBasket * @return oxBasket
*/ */
public function getBasket() public function getBasket()
{ {
$oBasket = parent::getBasket(); $oBasket = parent::getBasket();
if (false == $oBasket && oxRegistry::getConfig()->getActiveView()->getClassName() == 'd3dev') { if (false == $oBasket && oxRegistry::getConfig()->getActiveView()->getClassName() == 'd3dev') {
$oBasket = $this->d3DevGetOrderBasket(); $oBasket = $this->d3DevGetOrderBasket();
} }
return $oBasket; return $oBasket;
} }
protected function _d3AddVouchers() protected function _d3AddVouchers()
{ {
$sSelect = "SELECT oxid FROM oxvouchers WHERE oxorderid = ".oxDb::getDb(oxDb::FETCH_MODE_ASSOC)->quote($this->getId()).";"; $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); $aResult = oxDb::getDb(oxDb::FETCH_MODE_ASSOC)->getArray($sSelect);
foreach ($aResult as $aFields) { foreach ($aResult as $aFields) {
$oVoucher = oxNew('oxvoucher'); $oVoucher = oxNew('oxvoucher');
$oVoucher->load($aFields['oxid']); $oVoucher->load($aFields['oxid']);
$this->_aVoucherList[$oVoucher->getId()] = $oVoucher; $this->_aVoucherList[$oVoucher->getId()] = $oVoucher;
} }
} }
} }

View File

@ -1,28 +1,28 @@
<?php <?php
/** /**
* This Software is the property of Data Development and is protected * This Software is the property of Data Development and is protected
* by copyright law - it is NOT Freeware. * by copyright law - it is NOT Freeware.
* *
* Any unauthorized use of this software without a valid license * Any unauthorized use of this software without a valid license
* is a violation of the license agreement and will be prosecuted by * is a violation of the license agreement and will be prosecuted by
* civil and criminal law. * civil and criminal law.
* *
* http://www.shopmodule.com * http://www.shopmodule.com
* *
* @copyright <20> D<> Data Development, Thomas Dartsch * @copyright <20> D<> Data Development, Thomas Dartsch
* @author D<> Data Development - Daniel Seifert <ds@shopmodule.com> * @author D<> Data Development - Daniel Seifert <ds@shopmodule.com>
* @link http://www.oxidmodule.com * @link http://www.oxidmodule.com
*/ */
class d3_dev_oxorderarticle extends d3_dev_oxorderarticle_parent class d3_dev_oxorderarticle extends d3_dev_oxorderarticle_parent
{ {
/** /**
* @return array * @return array
*/ */
public function getCustomerAlsoBoughtThisProducts() public function getCustomerAlsoBoughtThisProducts()
{ {
$oArticle = $this->getArticle(); $oArticle = $this->getArticle();
return $oArticle->getCustomerAlsoBoughtThisProducts(); return $oArticle->getCustomerAlsoBoughtThisProducts();
} }
} }

View File

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

View File

@ -1,4 +1,4 @@
=> 1.0.0.0 => 1.0.0.0
- unterbindet das L<>schen des Warenkorbs nach Bestellabschluss - unterbindet das L<>schen des Warenkorbs nach Bestellabschluss
- Thankyou ist ohne Bestellabschluss aufrufbar (unter Angabe der Bestellnummer auch f<>r eine bestimmte Bestellung) - Thankyou ist ohne Bestellabschluss aufrufbar (unter Angabe der Bestellnummer auch f<>r eine bestimmte Bestellung)
- Bestellbest<73>tigungsmails sind im Browser darstellbar (unter Angabe der Bestellnummer auch f<>r eine bestimmte Bestellung) - Bestellbest<73>tigungsmails sind im Browser darstellbar (unter Angabe der Bestellnummer auch f<>r eine bestimmte Bestellung)