當前位置: 首頁>>代碼示例>>PHP>>正文


PHP osC_Order::sendSms方法代碼示例

本文整理匯總了PHP中osC_Order::sendSms方法的典型用法代碼示例。如果您正苦於以下問題:PHP osC_Order::sendSms方法的具體用法?PHP osC_Order::sendSms怎麽用?PHP osC_Order::sendSms使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在osC_Order的用法示例。


在下文中一共展示了osC_Order::sendSms方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: process

 function process($order_id, $status_id = '', $comments = '')
 {
     global $osC_Database;
     if (empty($status_id) || is_numeric($status_id) === false) {
         $status_id = DEFAULT_ORDERS_STATUS_ID;
     }
     $Qstatus = $osC_Database->query('insert into :table_orders_status_history (orders_id, orders_status_id, date_added, customer_notified, sms_customer_notified, comments) values (:orders_id, :orders_status_id, now(), :customer_notified, :sms_customer_notified, :comments)');
     $Qstatus->bindTable(':table_orders_status_history', TABLE_ORDERS_STATUS_HISTORY);
     $Qstatus->bindInt(':orders_id', $order_id);
     $Qstatus->bindInt(':orders_status_id', $status_id);
     $Qstatus->bindInt(':customer_notified', SEND_EMAILS == '1' ? '1' : '0');
     $Qstatus->bindInt(':sms_customer_notified', SEND_SMS_NEW_OREDER_TO_USER == '1' ? '1' : '0');
     $Qstatus->bindValue(':comments', $comments);
     $Qstatus->execute();
     $Qupdate = $osC_Database->query('update :table_orders set orders_status = :orders_status where orders_id = :orders_id');
     $Qupdate->bindTable(':table_orders', TABLE_ORDERS);
     $Qupdate->bindInt(':orders_status', $status_id);
     $Qupdate->bindInt(':orders_id', $order_id);
     $Qupdate->execute();
     $Qproducts = $osC_Database->query('select orders_products_id, products_id, products_quantity from :table_orders_products where orders_id = :orders_id');
     $Qproducts->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
     $Qproducts->bindInt(':orders_id', $order_id);
     $Qproducts->execute();
     while ($Qproducts->next()) {
         osC_Product::updateStock($order_id, $Qproducts->valueInt('orders_products_id'), $Qproducts->valueInt('products_id'), $Qproducts->valueInt('products_quantity'));
     }
     $order_status = self::getOrderStatusData($status_id);
     if ($order_status['downloads_flag'] == 1) {
         self::activeDownloadables($order_id);
     }
     if ($order_status['gift_certificates_flag'] == 1) {
         self::activeGiftCertificates($order_id);
     }
     osC_Order::sendEmail($order_id);
     //start sms by persian support Group
     osC_Order::sendSms($order_id);
     // end sms by persian support Group
     unset($_SESSION['prepOrderID']);
 }
開發者ID:sajad1441,項目名稱:TomatoShop-v1,代碼行數:39,代碼來源:order.php


注:本文中的osC_Order::sendSms方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。