22 if ( $soxId !=
"-1" && isset( $soxId ) ) {
24 $oOrder =
oxNew(
"oxorder" );
25 $oOrder->load( $soxId);
29 if ( $oOrder->oxorder__oxpaid->value !=
"0000-00-00 00:00:00") {
30 $oOrder->blIsPaid =
true;
31 $oOrder->oxorder__oxpaid =
new oxField(
oxRegistry::get(
"oxUtilsDate")->formatDBDate( $oOrder->oxorder__oxpaid->value ) );
35 $this->_aViewData[
"edit"] = $oOrder;
36 $this->_aViewData[
"paymentType"] = $oOrder->getPaymentType();
37 $this->_aViewData[
"oShipSet"] = $oOrder->getShippingSetList();
40 if ( $oOrder->oxorder__oxdeltype->value ) {
43 $oUser =
oxNew(
'oxuser' );
44 $oUser->load( $oOrder->oxorder__oxuserid->value );
47 $dPrice = $oOrder->oxorder__oxtotalbrutsum->value / $oOrder->oxorder__oxcurrate->value;
49 $this->_aViewData[
"oPayments"] =
oxRegistry::get(
"oxPaymentList")->getPaymentList( $oOrder->oxorder__oxdeltype->value, $dPrice, $oUser );
53 $this->_aViewData[
"aVouchers"] = $oOrder->getVoucherNrList();
56 $this->_aViewData[
"sNowValue"] = date(
"Y-m-d H:i:s",
oxRegistry::get(
"oxUtilsDate")->getTime());
57 return "order_main.tpl";
74 $aParams[
'oxorder__oxshopid'] = $sShopID;
76 $oOrder =
oxNew(
"oxorder" );
77 if ( $soxId !=
"-1") {
78 $oOrder->load( $soxId);
80 $aParams[
'oxorder__oxid'] = null;
85 if ($sPayId != $oOrder->oxorder__oxpaymenttype->value) {
86 $aParams[
'oxorder__oxpaymenttype'] = $sPayId;
89 $oOrder->assign( $aParams);
92 if ( isset( $aDynvalues ) ) {
93 $oPayment =
oxNew(
"oxuserpayment" );
94 $oPayment->load( $oOrder->oxorder__oxpaymentid->value);
95 $oPayment->oxuserpayments__oxvalue->setValue(
oxRegistry::getUtils()->assignValuesToText( $aDynvalues));
100 if ($sDelSetId != $oOrder->oxorder__oxdeltype->value) {
101 $oOrder->oxorder__oxpaymenttype->setValue(
"oxempty" );
102 $oOrder->setDelivery( $sDelSetId );
105 $oOrder->reloadDelivery(
false );
109 $oOrder->reloadDiscount(
false );
111 $oOrder->recalculateOrder();
127 $oOrder =
oxNew(
"oxorder" );
128 if ( $oOrder->load( $soxId ) ) {
131 $oOrder->oxorder__oxsenddate =
new oxField( date(
"Y-m-d H:i:s",
oxRegistry::get(
"oxUtilsDate")->getTime() ) );
135 $oOrderArticles = $oOrder->getOrderArticles(
true );
138 $oEmail =
oxNew(
"oxemail" );
139 $oEmail->sendSendedNowMail( $oOrder );
153 $oOrder =
oxNew(
"oxorder" );
154 if ( $oOrder->load( $soxId ) ) {
155 $oEmail =
oxNew(
"oxemail" );
156 $oEmail->sendDownloadLinksMail( $oOrder );
167 $oOrder =
oxNew(
"oxorder" );
168 if ( $oOrder->load( $this->getEditObjectId() ) ) {
170 $oOrder->oxorder__oxsenddate =
new oxField(
"0000-00-00 00:00:00");