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


PHP mslib_fe::mailOrder方法代码示例

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


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

示例1: switch

                     $mailTo = '';
                     switch ($this->post['tx_multishop_pi1']['action']) {
                         case 'mail_selected_orders_to_customer':
                             // Empty to mail to the owner of the order
                             $mailTo = '';
                             break;
                         case 'mail_selected_orders_to_merchant':
                             $mailTo = $this->ms['MODULES']['STORE_EMAIL'];
                             break;
                     }
                     if ($mailTo) {
                         $printAddress = $mailTo;
                     } else {
                         $printAddress = $order['billing_email'];
                     }
                     if (mslib_fe::mailOrder($orders_id, 0, $mailTo, $mail_template)) {
                         $postErno[] = array('status' => 'info', 'message' => 'Order ' . $orders_id . ' has been mailed to: ' . $printAddress);
                     } else {
                         $postErno[] = array('status' => 'error', 'message' => 'Failed to mail order ' . $orders_id . ' to: ' . $printAddress);
                     }
                 } else {
                     $postErno[] = array('status' => 'error', 'message' => 'Failed to retrieve order: ' . $orders_id);
                 }
             } 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':
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:admin_orders.php

示例2:

                // relative mode
                require $this->DOCUMENT_ROOT . $this->ms['MODULES']['ADMIN_CATEGORIES_EDIT_TYPE'] . '.php';
            } else {
                require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/admin_pages/includes/admin_edit_category.php';
            }
        }
        break;
    case 'add_multiple_category':
        require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/admin_pages/includes/admin_add_multiple_categories.php';
        break;
    case 'delete_category':
        require \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('multishop') . 'scripts/admin_pages/includes/admin_delete_category.php';
        break;
    case 'mail_order':
        if ($this->post['orders_id'] and $this->post['tx_multishop_pi1']['email']) {
            mslib_fe::mailOrder($this->post['orders_id'], 1, $this->post['tx_multishop_pi1']['email']);
            /*
            $content.='
            <script type="text/javascript">
            parent.window.location.reload();
            </script>
                    ';
            */
        } else {
            if ($this->get['orders_id']) {
                $order = mslib_fe::getOrder($this->get['orders_id']);
                if ($order['orders_id']) {
                    $content .= '
			<div id="mini-form-field">
				<form method="post" action="' . mslib_fe::typolink($this->shop_pid . ',2003', '&tx_multishop_pi1[page_section]=mail_order&orders_id=' . $order['orders_id'] . '&action=mail_order') . '">
					<div class="mini-account-field">
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:core.php

示例3: updateOrderStatusToPaid

 public function updateOrderStatusToPaid($orders_id, $timestamp = '')
 {
     if (!is_numeric($orders_id)) {
         return false;
     }
     $order = mslib_fe::getOrder($orders_id);
     if (!$order['paid']) {
         //hook to let other plugins further manipulate the replacers
         if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['updateOrderStatusToPaidPreProc'])) {
             $params = array('order' => &$order);
             foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['updateOrderStatusToPaidPreProc'] as $funcRef) {
                 \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
             }
         }
         $updateArray = array('paid' => 1);
         $updateArray['orders_last_modified'] = time();
         if (!$timestamp) {
             $timestamp = time();
         }
         // set the order status based on payment method settings
         $payment_method = mslib_fe::loadPaymentMethod($order['payment_method']);
         $payment_method_vars = unserialize($payment_method['vars']);
         $payment_method_vars['success_status'] = (int) $payment_method_vars['success_status'];
         if ($payment_method['provider'] == 'generic' && isset($payment_method_vars['success_status']) && is_numeric($payment_method_vars['success_status']) && $payment_method_vars['success_status'] > 0) {
             $updateArray['status'] = $payment_method_vars['success_status'];
         }
         $updateArray['orders_paid_timestamp'] = $timestamp;
         $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_orders', 'orders_id=' . $orders_id, $updateArray);
         $res = $GLOBALS['TYPO3_DB']->sql_query($query);
         if ($this->ms['MODULES']['ADMIN_INVOICE_MODULE'] && $this->ms['MODULES']['GENERATE_INVOICE_ID_AFTER_ORDER_SET_TO_PAID']) {
             // create invoice
             $invoice = mslib_fe::getOrderInvoice($orders_id);
             $updateArray = array('paid' => 1);
             $query = $GLOBALS['TYPO3_DB']->UPDATEquery('tx_multishop_invoices', 'hash=\'' . $invoice['hash'] . '\'', $updateArray);
             $res = $GLOBALS['TYPO3_DB']->sql_query($query);
         }
         $continue = 1;
         foreach ($order['products'] as $product) {
             $module_settings = mslib_fe::loadInherentCustomSettingsByProduct($product['products_id']);
             if ($module_settings['ORDERS_PAID_CUSTOM_SCRIPT']) {
                 if (!strstr($module_settings['ORDERS_PAID_CUSTOM_SCRIPT'], "..")) {
                     if (strstr($module_settings['ORDERS_PAID_CUSTOM_SCRIPT'], "/")) {
                         $continue = 0;
                         require PATH_site . $module_settings['ORDERS_PAID_CUSTOM_SCRIPT'] . '.php';
                     }
                 }
             }
         }
         if ($this->ms['MODULES']['ORDERS_PAID_CUSTOM_SCRIPT'] and $continue) {
             if (!strstr($module_settings['ORDERS_PAID_CUSTOM_SCRIPT'], "..")) {
                 if (strstr($module_settings['ORDERS_PAID_CUSTOM_SCRIPT'], "/")) {
                     require PATH_site . $module_settings['ORDERS_PAID_CUSTOM_SCRIPT'] . '.php';
                 }
             }
         }
         $mailOrder = 1;
         //hook to let other plugins further manipulate the replacers
         if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['updateOrderStatusToPaidPostProc'])) {
             $params = array('order' => &$order, 'mailOrder' => &$mailOrder);
             foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/multishop/pi1/classes/class.mslib_fe.php']['updateOrderStatusToPaidPostProc'] as $funcRef) {
                 \TYPO3\CMS\Core\Utility\GeneralUtility::callUserFunction($funcRef, $params, $this);
             }
         }
         if ($mailOrder) {
             $tmp = mslib_fe::mailOrder($order['orders_id'], 1, '', 'email_order_paid_letter');
         }
         return true;
     } else {
         return false;
     }
 }
开发者ID:bvbmedia,项目名称:multishop,代码行数:71,代码来源:class.mslib_fe.php

示例4: CheckoutStepping

     $mslib_order->init($this);
     $orders_id = $mslib_cart->convertCartToOrder($GLOBALS['TSFE']->fe_user->getKey('ses', $this->cart_page_uid));
     if ($orders_id) {
         $show_thank_you = 1;
         if ($show_thank_you) {
             // reload the order so all vars are the same
             $order = mslib_fe::getOrder($orders_id);
             $content .= CheckoutStepping($stepCodes, current($stepCodes), $this);
             // good, proceed to the thank you page
             $send_mail = 1;
             if ($send_mail) {
                 // replacing the variables with dynamic values eof
                 // $user=array();
                 // $user['name']	= $full_customer_name;
                 // $user['email']	= $address['email'];
                 mslib_fe::mailOrder($orders_id, 1);
             }
             $order = $GLOBALS['TSFE']->fe_user->getKey('ses', 'tx_multishop_order');
             $order['orders_id'] = $orders_id;
             $GLOBALS['TSFE']->fe_user->setKey('ses', 'tx_multishop_order', $order);
             $GLOBALS['TSFE']->storeSessionData();
             next($stepCodes);
             header("Location: " . $this->FULL_HTTP_URL . mslib_fe::typolink($this->conf['checkout_page_pid'], 'tx_multishop_pi1[page_section]=' . $this->ms['page'] . '&tx_multishop_pi1[previous_checkout_section]=' . current($stepCodes) . '&orders_id=' . $orders_id));
             exit;
             //			require(current($stepCodes).'.php');
         }
     }
 } else {
     echo "<pre>";
     print_r($address);
     echo "</pre>";
开发者ID:bvbmedia,项目名称:multishop,代码行数:31,代码来源:checkout_process.php


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