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


PHP comquick2cartHelper::getOrderitems方法代碼示例

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


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

示例1: vendorEmail

 /**
  * vendorEmail
  *
  * @param   string  $order    order
  * @param   string  $orderid  orderid
  *
  * @return  Void
  */
 public function vendorEmail($order, $orderid)
 {
     $fullorder_id = $order['order_info'][0]->prefix . $orderid;
     // Getting orderitem infomation
     $comquick2cartHelper = new comquick2cartHelper();
     $order_details = $comquick2cartHelper->getOrderitems($orderid);
     // GETTTING STORE INFORMATION
     $store_array = array();
     $storeinfo = array();
     foreach ($order_details as $cart) {
         if (!in_array($cart['store_id'], $store_array)) {
             $store_array[] = $cart['store_id'];
             $qtc_store_id = $cart['store_id'];
             $storeinfo[$qtc_store_id] = $comquick2cartHelper->getSoreInfo($cart['store_id']);
         }
     }
     $original_order_data = $order;
     foreach ($storeinfo as $key => $sinfo) {
         // Check for view override
         $view = $comquick2cartHelper->getViewpath('orders', 'order');
         $this->orders_site = 1;
         $this->orders_email = 1;
         $this->vendor_email = 1;
         $this->order_authorized = 1;
         // STORE RELEATED VIEW
         $this->storeReleatedView = 1;
         $html = '';
         $temp = $original_order_data['items'];
         // 3. REMOVE other verder store item  information
         foreach ($temp as $k => $order_item) {
             if ($order_item->store_id != $key) {
                 unset($temp[$k]);
             }
         }
         $this->orderinfo = $original_order_data['order_info'];
         $this->vendor_email = 1;
         $this->vendor_store_id = $key;
         $this->orderitems = $temp;
         $mainframe = JFactory::getApplication();
         $site = $mainframe->getCfg('sitename');
         $html = '<div>' . JText::sprintf('QTC_ORDER_VENDER_MAIL_MSG', $sinfo['title']) . '</div>';
         $subject = JText::sprintf('QTC_ORDER_MAIL_SUB', $site, $fullorder_id);
         ob_start();
         include $view;
         $html = ob_get_contents();
         ob_end_clean();
         $body = $html;
         $comquick2cartHelper->sendmail($sinfo['store_email'], $subject, $body, '');
     }
 }
開發者ID:BetterBetterBetter,項目名稱:B3App,代碼行數:58,代碼來源:helper.php


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