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


PHP Customer::searchByName方法代码示例

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


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

示例1: ajax_agile_getcustomers

function ajax_agile_getcustomers()
{
    ${${"GLOBALS"}["jjszcyoinwyy"]} = explode(" ", Tools::getValue("customer_search"));
    ${"GLOBALS"}["btkmsumgqi"] = "customers";
    $lwjbynsy = "searches";
    $mfzpveyc = "to_return";
    $bmwjhsn = "customers";
    ${"GLOBALS"}["mcqemkddxvk"] = "searches";
    $cccuivsxp = "to_return";
    ${${"GLOBALS"}["kglmxvwgfexa"]} = array();
    ${${"GLOBALS"}["mcqemkddxvk"]} = array_unique(${$lwjbynsy});
    foreach (${${"GLOBALS"}["jjszcyoinwyy"]} as ${${"GLOBALS"}["dotono"]}) {
        $mimdxaoxdl = "results";
        if (!empty(${${"GLOBALS"}["dotono"]}) && (${$mimdxaoxdl} = Customer::searchByName(${${"GLOBALS"}["dotono"]}))) {
            foreach (${${"GLOBALS"}["itmfakpwu"]} as ${${"GLOBALS"}["dbgjiec"]}) {
                ${"GLOBALS"}["cgwtffyvk"] = "result";
                ${${"GLOBALS"}["kglmxvwgfexa"]}[${${"GLOBALS"}["dbgjiec"]}["id_customer"]] = ${${"GLOBALS"}["cgwtffyvk"]};
            }
        }
    }
    if (count(${${"GLOBALS"}["btkmsumgqi"]})) {
        ${$cccuivsxp} = array("customers" => ${$bmwjhsn}, "found" => true);
    } else {
        ${$mfzpveyc} = array("found" => false);
    }
    return Tools::jsonEncode(${${"GLOBALS"}["nduihox"]});
}
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:27,代码来源:ajax_agile_getcustomers.php

示例2: ajaxProcess

 /**
  * Method called when an ajax request is made
  * @see AdminController::postProcess()
  */
 public function ajaxProcess()
 {
     if (Tools::isSubmit('email')) {
         $email = pSQL(Tools::getValue('email'));
         $customer = Customer::searchByName($email);
         if (!empty($customer)) {
             $customer = $customer['0'];
             echo Tools::jsonEncode(array('infos' => pSQL($customer['firstname']) . '_' . pSQL($customer['lastname']) . '_' . pSQL($customer['company'])));
         }
     }
     die;
 }
开发者ID:dev-lav,项目名称:htdocs,代码行数:16,代码来源:AdminAddressesController.php

示例3: searchCustomer

 /**
  * Search a specific name in the customers
  *
  * @params string $query String to find in the catalog
  */
 public function searchCustomer()
 {
     $this->_list['customers'] = Customer::searchByName($this->query);
 }
开发者ID:ecssjapan,项目名称:guiding-you-afteropen,代码行数:9,代码来源:AdminSearchController.php

示例4: ajaxProcessSearchCustomers

 /**
  * add to $this->content the result of Customer::SearchByName
  * (encoded in json)
  *
  * @return void
  */
 public function ajaxProcessSearchCustomers()
 {
     $searches = explode(' ', Tools::getValue('customer_search'));
     $customers = array();
     $searches = array_unique($searches);
     foreach ($searches as $search) {
         if (!empty($search) && ($results = Customer::searchByName($search, 50))) {
             foreach ($results as $result) {
                 if ($result['active']) {
                     $customers[$result['id_customer']] = $result;
                 }
             }
         }
     }
     if (count($customers)) {
         $to_return = array('customers' => $customers, 'found' => true);
     } else {
         $to_return = array('found' => false);
     }
     $this->content = Tools::jsonEncode($to_return);
 }
开发者ID:nmardones,项目名称:PrestaShop,代码行数:27,代码来源:AdminCustomersController.php

示例5: ajaxProcessSearchCustomers

 public function ajaxProcessSearchCustomers()
 {
     if ($customers = Customer::searchByName(pSQL(Tools::getValue('customer_search')))) {
         $to_return = array('customers' => $customers, 'found' => true);
     } else {
         $to_return = array('found' => false);
     }
     $this->content = Tools::jsonEncode($to_return);
 }
开发者ID:jicheng17,项目名称:pengwine,代码行数:9,代码来源:AdminOrdersController.php

示例6: ajaxProcessSearchCustomers

 /**
  * add to $this->content the result of Customer::SearchByName
  * (encoded in json)
  *
  * @return void
  */
 public function ajaxProcessSearchCustomers()
 {
     $searches = explode(' ', Tools::getValue('customer_search'));
     $customers = array();
     $searches = array_unique($searches);
     foreach ($searches as $search) {
         if (!empty($search) && ($results = Customer::searchByName($search, 50))) {
             foreach ($results as $result) {
                 if ($result['active']) {
                     $result['fullname_and_email'] = $result['firstname'] . ' ' . $result['lastname'] . ' - ' . $result['email'];
                     $customers[$result['id_customer']] = $result;
                 }
             }
         }
     }
     if (count($customers) && Tools::getValue('sf2')) {
         $to_return = $customers;
     } elseif (count($customers) && !Tools::getValue('sf2')) {
         $to_return = array('customers' => $customers, 'found' => true);
     } else {
         $to_return = Tools::getValue('sf2') ? array() : array('found' => false);
     }
     $this->content = json_encode($to_return);
 }
开发者ID:M03G,项目名称:PrestaShop,代码行数:30,代码来源:AdminCustomersController.php

示例7: searchCustomer

 /**
  * Search a specific name in the customers
  *
  * @params string $query String to find in the catalog
  */
 public function searchCustomer($query)
 {
     $this->_list['customers'] = Customer::searchByName(trim($query));
 }
开发者ID:Evil1991,项目名称:PrestaShop-1.4,代码行数:9,代码来源:AdminSearch.php


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