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


PHP WishList::getCustomers方法代碼示例

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


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

示例1: renderForm

 public function renderForm()
 {
     $_customers = WishList::getCustomers();
     foreach ($_customers as $c) {
         $_customers[$c['id_customer']]['id_customer'] = $c['id_customer'];
         $_customers[$c['id_customer']]['name'] = $c['firstname'] . ' ' . $c['lastname'];
     }
     $fields_form = array('form' => array('legend' => array('title' => $this->l('Listing'), 'icon' => 'icon-cogs'), 'input' => array(array('type' => 'select', 'label' => $this->l('Customers :'), 'name' => 'id_customer', 'options' => array('default' => array('value' => 0, 'label' => $this->l('Choose customer')), 'query' => $_customers, 'id' => 'id_customer', 'name' => 'name')))));
     if ($id_customer = Tools::getValue('id_customer')) {
         $wishlists = WishList::getByIdCustomer($id_customer);
         $fields_form['form']['input'][] = array('type' => 'select', 'label' => $this->l('Wishlist :'), 'name' => 'id_wishlist', 'options' => array('default' => array('value' => 0, 'label' => $this->l('Choose wishlist')), 'query' => $wishlists, 'id' => 'id_wishlist', 'name' => 'name'));
     }
     $helper = new HelperForm();
     $helper->show_toolbar = false;
     $helper->table = $this->table;
     $lang = new Language((int) Configuration::get('PS_LANG_DEFAULT'));
     $helper->default_form_language = $lang->id;
     $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') ? Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG') : 0;
     $helper->identifier = $this->identifier;
     $helper->submit_action = 'submitModule';
     $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) . '&configure=' . $this->name . '&tab_module=' . $this->tab . '&module_name=' . $this->name;
     $helper->token = Tools::getAdminTokenLite('AdminModules');
     $helper->tpl_vars = array('fields_value' => $this->getConfigFieldsValues(), 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id);
     return $helper->generateForm(array($fields_form));
 }
開發者ID:ortegon000,項目名稱:tienda,代碼行數:25,代碼來源:blockwishlist.php


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