当前位置: 首页>>代码示例>>PHP>>正文


PHP mslib_fe::updateOrderStatusToPaid方法代码示例

本文整理汇总了PHP中mslib_fe::updateOrderStatusToPaid方法的典型用法代码示例。如果您正苦于以下问题:PHP mslib_fe::updateOrderStatusToPaid方法的具体用法?PHP mslib_fe::updateOrderStatusToPaid怎么用?PHP mslib_fe::updateOrderStatusToPaid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mslib_fe的用法示例。


在下文中一共展示了mslib_fe::updateOrderStatusToPaid方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

                 }
             } else {
                 $postErno[] = array('status' => 'error', 'message' => 'Failed to retrieve order: ' . $orders_id);
             }
         }
     }
     break;
 case 'update_selected_orders_to_paid':
 case 'update_selected_orders_to_not_paid':
     if (is_array($this->post['selected_orders']) and count($this->post['selected_orders'])) {
         foreach ($this->post['selected_orders'] as $orders_id) {
             if (is_numeric($orders_id)) {
                 $order = mslib_fe::getOrder($orders_id);
                 if ($order['orders_id']) {
                     if ($this->post['tx_multishop_pi1']['action'] == 'update_selected_orders_to_paid') {
                         if (mslib_fe::updateOrderStatusToPaid($orders_id)) {
                             $postErno[] = array('status' => 'info', 'message' => 'Order ' . $orders_id . ' has been updated to paid.');
                         } else {
                             $postErno[] = array('status' => 'error', 'message' => 'Failed to update ' . $orders_id . ' to paid.');
                         }
                     } elseif ($this->post['tx_multishop_pi1']['action'] == 'update_selected_orders_to_not_paid') {
                         $updateArray = array('paid' => 0);
                         $updateArray['orders_last_modified'] = time();
                         $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_orders', 'orders_id=' . $orders_id, $updateArray);
                         $res = $GLOBALS['TYPO3_DB']->sql_query($query);
                     }
                 }
             }
         }
     }
     break;
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:admin_orders.php

示例2: convertCartToOrder


//.........这里部分代码省略.........
             $orders_tax['tax_separation'] = $tax_separation;
             if ($this->ms['MODULES']['DISABLE_VAT_RATE']) {
                 $orders_tax['total_orders_tax'] = 0;
             }
             $orders_tax['grand_total'] = (string) array_sum($grand_total);
             $updateArray['orders_tax_data'] = serialize($orders_tax);
             $updateArray['grand_total'] = $orders_tax['grand_total'];
             if (!empty($cart['coupon_code'])) {
                 $updateArray['coupon_code'] = $cart['coupon_code'];
                 $updateArray['coupon_discount_type'] = $cart['discount_type'];
                 $updateArray['coupon_discount_value'] = $cart['discount'];
             }
             $updateArray['orders_last_modified'] = time();
             $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_orders', 'orders_id=\'' . $orders_id . '\'', $updateArray);
             $res = $GLOBALS['TYPO3_DB']->sql_query($query);
             if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['insertOrderDiscountPreProc'])) {
                 // hook
                 $params = array('ms' => $this->ms, 'orders_id' => $orders_id, 'cart' => &$cart);
                 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['insertOrderDiscountPreProc'] as $funcRef) {
                     \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
                 }
                 // hook oef
             }
             if ($cart['discount']) {
                 if ($cart['discount']) {
                     if ($cart['coupon_code']) {
                         $str = "update tx_multishop_coupons set times_used=(times_used+1) where code='" . addslashes($cart['coupon_code']) . "'";
                         $res = $GLOBALS['TYPO3_DB']->sql_query($str);
                         $cart['coupon_code'] = '';
                     }
                     $cart['discount'] = '';
                     $cart['discount_type'] = '';
                 }
             }
             mslib_befe::storeCustomerCartContent($cart, $customer_id, 1);
             // debug
             /*
             $order=mslib_fe::getOrder($orders_id);
             $ORDER_DETAILS=mslib_fe::printOrderDetailsTable($order,'email');
             echo $ORDER_DETAILS;
             die();
             */
             if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['insertOrderPostHook'])) {
                 // hook
                 $params = array('cart' => &$cart, 'orders_id' => &$orders_id);
                 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['insertOrderPostHook'] as $funcRef) {
                     \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
                 }
                 // hook oef
             }
             $cart['products'] = array();
             //unset($cart['user']);
             unset($cart['discount_type']);
             unset($cart['discount_amount']);
             //$GLOBALS['TSFE']->fe_user->setKey('ses', $this->cart_page_uid, $cart);
             //$GLOBALS['TSFE']->storeSessionData();
             tx_mslib_cart::storeCart($cart);
             // unset the cart with original key
             $plain_cart_key = 'tx_multishop_cart';
             if ($this->ms['MODULES']['CART_PAGE_UID']) {
                 $plain_cart_key .= '_' . $this->ms['MODULES']['CART_PAGE_UID'];
             }
             $cart2 = $GLOBALS['TSFE']->fe_user->getKey('ses', $plain_cart_key);
             $cart2['products'] = array();
             //unset($cart2['user']);
             unset($cart2['discount_type']);
             unset($cart2['discount_amount']);
             //TODO: plain cart key?
             //$GLOBALS['TSFE']->fe_user->setKey('ses', $plain_cart_key, $cart2);
             //$GLOBALS['TSFE']->storeSessionData();
             tx_mslib_cart::storeCart($cart2);
             // custom error script for checkout
             if ($this->ms['MODULES']['ORDERS_CUSTOM_EXPORT_SCRIPT']) {
                 if (strstr($this->ms['MODULES']['ORDERS_CUSTOM_EXPORT_SCRIPT'], "..")) {
                     die('error in ORDERS_CUSTOM_EXPORT_SCRIPT value');
                 } else {
                     require $this->DOCUMENT_ROOT . $this->ms['MODULES']['ORDERS_CUSTOM_EXPORT_SCRIPT'] . '.php';
                 }
             }
             require_once \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'pi1/classes/class.tx_mslib_order.php';
             $mslib_order = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('tx_mslib_order');
             $mslib_order->init($this);
             $mslib_order->repairOrder($orders_id);
             // if grand total is zero we have to activate directly
             $order = mslib_fe::getOrder($orders_id);
             if ($order['orders_id'] and $order['grand_total'] < 0.001) {
                 mslib_fe::updateOrderStatusToPaid($order['orders_id']);
             }
             if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['insertOrderLastPostHook'])) {
                 // hook
                 $params = array('orders_id' => &$orders_id);
                 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/class.tx_multishop_pi1.php']['insertOrderLastPostHook'] as $funcRef) {
                     \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
                 }
                 // hook oef
             }
             return $orders_id;
         }
     }
 }
开发者ID:bvbmedia,项目名称:multishop,代码行数:101,代码来源:class.tx_mslib_cart.php

示例3: array

             } else {
                 $updateArray['orders_paid_timestamp'] = $this->post['tx_multishop_pi1']['orders_paid_timestamp'];
             }
             if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/admin_pages/includes/admin_edit_order.php']['adminEditOrderUpdateOrderPreProc'])) {
                 $params = array('updateArray' => &$updateArray, 'orders_id' => &$this->get['orders_id']);
                 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/scripts/admin_pages/includes/admin_edit_order.php']['adminEditOrderUpdateOrderPreProc'] as $funcRef) {
                     \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
                 }
             }
             if (count($updateArray)) {
                 $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_orders', 'orders_id=\'' . $this->get['orders_id'] . '\'', $updateArray);
                 $res = $GLOBALS['TYPO3_DB']->sql_query($query);
             }
         } else {
             // if order not yet paid use official method for updating to status paid
             mslib_fe::updateOrderStatusToPaid($this->get['orders_id'], $this->post['tx_multishop_pi1']['orders_paid_timestamp']);
         }
     }
 }
 // if ($this->ms['MODULES']['ORDER_EDIT']) eol
 // editable properties of orders, even when ORDERS_EDIT is disabled
 if ($this->post) {
     $updateArray = array();
     $updateArray['expected_delivery_date'] = '';
     if ($this->post['expected_delivery_date'] && $this->post['expected_delivery_date_local']) {
         $updateArray['expected_delivery_date'] = strtotime($this->post['expected_delivery_date']);
     }
     if ($this->post['track_and_trace_code']) {
         $updateArray['track_and_trace_code'] = $this->post['track_and_trace_code'];
     }
     if ($this->post['order_memo']) {
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:admin_edit_order.php


注:本文中的mslib_fe::updateOrderStatusToPaid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。