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


PHP CustomerThread::getTotalCustomerThreads方法代碼示例

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


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

示例1: renderList

    public function renderList()
    {
        $this->addRowAction('view');
        $this->addRowAction('delete');
        $this->_select = '
 			CONCAT(c.`firstname`," ",c.`lastname`) as customer, cl.`name` as contact, l.`name` as language, group_concat(message) as messages,
 			(
				SELECT IFNULL(CONCAT(LEFT(e.`firstname`, 1),". ",e.`lastname`), "--")
				FROM `' . _DB_PREFIX_ . 'customer_message` cm2
				INNER JOIN ' . _DB_PREFIX_ . 'employee e
					ON e.`id_employee` = cm2.`id_employee`
				WHERE cm2.id_employee > 0
					AND cm2.`id_customer_thread` = a.`id_customer_thread`
				ORDER BY cm2.`date_add` DESC LIMIT 1
			) as employee';
        $this->_join = '
			LEFT JOIN `' . _DB_PREFIX_ . 'customer` c
				ON c.`id_customer` = a.`id_customer`
			LEFT JOIN `' . _DB_PREFIX_ . 'customer_message` cm
				ON cm.`id_customer_thread` = a.`id_customer_thread`
			LEFT JOIN `' . _DB_PREFIX_ . 'lang` l
				ON l.`id_lang` = a.`id_lang`
			LEFT JOIN `' . _DB_PREFIX_ . 'contact_lang` cl
				ON (cl.`id_contact` = a.`id_contact` AND cl.`id_lang` = ' . (int) $this->context->language->id . ')';
        $this->_group = 'GROUP BY cm.id_customer_thread';
        $this->_orderBy = 'id_customer_thread';
        $this->_orderWay = 'DESC';
        $contacts = CustomerThread::getContacts();
        $categories = Contact::getCategoriesContacts();
        $params = array($this->l('Total threads') => $all = CustomerThread::getTotalCustomerThreads(), $this->l('Threads pending') => $pending = CustomerThread::getTotalCustomerThreads('status LIKE "%pending%"'), $this->l('Total number of customer messages') => CustomerMessage::getTotalCustomerMessages('id_employee = 0'), $this->l('Total number of employee messages') => CustomerMessage::getTotalCustomerMessages('id_employee != 0'), $this->l('Unread threads') => $unread = CustomerThread::getTotalCustomerThreads('status = "open"'), $this->l('Closed threads') => $all - ($unread + $pending));
        $this->tpl_list_vars = array('contacts' => $contacts, 'categories' => $categories, 'params' => $params);
        return parent::renderList();
    }
開發者ID:Eximagen,項目名稱:3m,代碼行數:33,代碼來源:AdminCustomerThreadsController.php

示例2: getPendingMessages

 public static function getPendingMessages()
 {
     return CustomerThread::getTotalCustomerThreads('status LIKE "%pending%" OR status = "open"');
 }
開發者ID:gks-stage,項目名稱:prestashop,代碼行數:4,代碼來源:AdminStatsController.php

示例3: getPendingMessages

 public static function getPendingMessages()
 {
     return CustomerThread::getTotalCustomerThreads('status LIKE "%pending%" OR status = "open"' . Shop::addSqlRestriction());
 }
開發者ID:prestanesia,項目名稱:PrestaShop,代碼行數:4,代碼來源:AdminStatsController.php


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