本文整理汇总了PHP中Customers::getTypeMenuoptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Customers::getTypeMenuoptions方法的具体用法?PHP Customers::getTypeMenuoptions怎么用?PHP Customers::getTypeMenuoptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customers
的用法示例。
在下文中一共展示了Customers::getTypeMenuoptions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view_list
//.........这里部分代码省略.........
}
}
}
// Let the user choose whether to see pending orders, too
$show_pending_orders = false;
if ($backend) {
if (empty($_REQUEST['show_pending_orders'])) {
if (empty($arrStatus)) {
$arrStatus = self::getStatusArray();
unset($arrStatus[Order::STATUS_PENDING]);
}
} else {
if ($arrStatus) {
$arrStatus[Order::STATUS_PENDING] = true;
}
$show_pending_orders = true;
\Html::replaceUriParameter($uri, 'show_pending_orders=1');
}
}
if ($arrStatus) {
$filter['status'] = array_keys($arrStatus);
}
//DBG::log("Orders::view_list(): URI for Sorting: $uri, decoded ".html_entity_decode($uri));
$arrSorting = array('id' => $_ARRAYLANG['TXT_SHOP_ID'], 'date_time' => $_ARRAYLANG['TXT_SHOP_ORDER_DATE'], 'customer_name' => $_ARRAYLANG['TXT_SHOP_CUSTOMER'], 'sum' => $_ARRAYLANG['TXT_SHOP_ORDER_SUM'], 'status' => $_ARRAYLANG['TXT_SHOP_ORDER_STATUS']);
$objSorting = new \Sorting($uri, $arrSorting, false, 'order_shop_orders');
$uri_search = $uri;
\Html::stripUriParam($uri_search, 'searchterm');
\Html::stripUriParam($uri_search, 'customer_type');
\Html::stripUriParam($uri_search, 'status');
\Html::stripUriParam($uri_search, 'show_pending_orders');
$objTemplate->setGlobalVariable($_ARRAYLANG);
if ($backend) {
$txt_order_complete = sprintf($_ARRAYLANG['TXT_SEND_TEMPLATE_TO_CUSTOMER'], $_ARRAYLANG['TXT_ORDER_COMPLETE']);
$objTemplate->setVariable(array('SHOP_SEND_TEMPLATE_TO_CUSTOMER' => $txt_order_complete, 'SHOP_CUSTOMER_TYPE_MENUOPTIONS' => Customers::getTypeMenuoptions($customer_type, true), 'SHOP_CUSTOMER_SORT_MENUOPTIONS' => Customers::getSortMenuoptions($objSorting->getOrderField()), 'SHOP_SHOW_PENDING_ORDERS_CHECKED' => $show_pending_orders ? \Html::ATTRIBUTE_CHECKED : '', 'SHOP_ORDER_STATUS_MENUOPTIONS' => self::getStatusMenuoptions($status, true)));
}
//DBG::log("Orders::view_list(): Order complete: $txt_order_complete");
//DBG::log("Orders::view_list(): URI: $uri");
$objTemplate->setGlobalVariable(array('SHOP_SEARCH_TERM' => isset($filter['term']) ? $filter['term'] : '', 'SHOP_ORDERS_ORDER_NAME' => $objSorting->getOrderParameterName(), 'SHOP_ORDERS_ORDER_VALUE' => $objSorting->getOrderUriEncoded(), 'SHOP_ACTION_URI_SEARCH_ENCODED' => $uri_search, 'SHOP_ACTION_URI_ENCODED' => $uri, 'SHOP_ACTION_URI' => html_entity_decode($uri), 'SHOP_CURRENCY', Currency::getDefaultCurrencySymbol()));
$count = 0;
$limit = \Cx\Core\Setting\Controller\Setting::getValue('numof_orders_per_page_backend', 'Shop');
// TODO: Obsolete ASAP
if (!$limit) {
ShopSettings::errorHandler();
$limit = 25;
}
$tries = 2;
$arrOrders = null;
//\DBG::activate(DBG_DB_FIREPHP);
while ($tries-- && $count == 0) {
$arrOrders = self::getArray($count, $objSorting->getOrder(), $filter, \Paging::getPosition(), $limit);
if ($count > 0) {
break;
}
\Paging::reset();
}
//DBG::deactivate(DBG_DB);
//\DBG::log("Orders: ".count($arrOrders));
$paging = \Paging::get($uri, $_ARRAYLANG['TXT_ORDERS'], $count, $limit, $count > 0);
$objTemplate->setVariable(array('SHOP_ORDER_PAGING' => $paging, 'SHOP_CUSTOMER_LISTLETTER' => isset($filter['letter']) ? $filter['letter'] : '', 'SHOP_HEADER_ID' => $objSorting->getHeaderForField('id'), 'SHOP_HEADER_DATE_TIME' => $objSorting->getHeaderForField('date_time'), 'SHOP_HEADER_STATUS' => $objSorting->getHeaderForField('status'), 'SHOP_HEADER_CUSTOMER_NAME' => $objSorting->getHeaderForField('customer_name'), 'SHOP_HEADER_NOTES' => $_ARRAYLANG['TXT_SHOP_ORDER_NOTES'], 'SHOP_HEADER_SUM' => $objSorting->getHeaderForField('sum'), 'SHOP_LISTLETTER_LINKS' => self::getListletterLinks(isset($filter['letter']) ? $filter['letter'] : NULL)));
if (empty($arrOrders)) {
// $objTemplate->hideBlock('orderTable');
$objTemplate->setVariable('SHOP_ORDER_NONE_FOUND', $_ARRAYLANG['TXT_SHOP_ORDERS_NONE_FOUND']);
//\DBG::log("NO Orders!");
return true;
}
$i = 0;
示例2: view_customer_edit
/**
* Edit a Customer
* @author Reto Kohli <reto.kohli@comvation.com>
*/
function view_customer_edit()
{
global $_ARRAYLANG;
self::$objTemplate->loadTemplateFile("module_shop_edit_customer.html");
$customer_id = isset($_REQUEST['customer_id']) ? intval($_REQUEST['customer_id']) : null;
if (isset($_POST['store'])) {
$customer_id = $this->storeCustomerFromPost();
}
$username = isset($_POST['username']) ? trim(strip_tags(contrexx_input2raw($_POST['username']))) : null;
$password = isset($_POST['password']) ? trim(strip_tags(contrexx_input2raw($_POST['password']))) : null;
$company = isset($_POST['company']) ? trim(strip_tags(contrexx_input2raw($_POST['company']))) : null;
$gender = isset($_POST['gender']) ? trim(strip_tags(contrexx_input2raw($_POST['gender']))) : null;
$firstname = isset($_POST['firstname']) ? trim(strip_tags(contrexx_input2raw($_POST['firstname']))) : null;
$lastname = isset($_POST['lastname']) ? trim(strip_tags(contrexx_input2raw($_POST['lastname']))) : null;
$address = isset($_POST['address']) ? trim(strip_tags(contrexx_input2raw($_POST['address']))) : null;
$city = isset($_POST['city']) ? trim(strip_tags(contrexx_input2raw($_POST['city']))) : null;
$zip = isset($_POST['zip']) ? trim(strip_tags(contrexx_input2raw($_POST['zip']))) : null;
$country_id = isset($_POST['country_id']) ? intval($_POST['country_id']) : null;
$phone = isset($_POST['phone']) ? trim(strip_tags(contrexx_input2raw($_POST['phone']))) : null;
$fax = isset($_POST['fax']) ? trim(strip_tags(contrexx_input2raw($_POST['fax']))) : null;
$email = isset($_POST['email']) ? trim(strip_tags(contrexx_input2raw($_POST['email']))) : null;
$companynote = isset($_POST['companynote']) ? trim(strip_tags(contrexx_input2raw($_POST['companynote']))) : null;
$is_reseller = isset($_POST['customer_type']) ? intval($_POST['customer_type']) : null;
$registerdate = time();
$active = !empty($_POST['active']);
$customer_group_id = isset($_POST['customer_group_id']) ? intval($_POST['customer_group_id']) : null;
$lang_id = isset($_POST['customer_lang_id']) ? intval($_POST['customer_lang_id']) : FRONTEND_LANG_ID;
if ($customer_id) {
$objCustomer = Customer::getById($customer_id);
if (!$objCustomer) {
return \Message::error($_ARRAYLANG['TXT_SHOP_CUSTOMER_ERROR_LOADING']);
}
self::$pageTitle = $_ARRAYLANG['TXT_EDIT_CUSTOMER'];
$username = $objCustomer->username();
$password = '';
$company = $objCustomer->company();
$gender = $objCustomer->gender();
$firstname = $objCustomer->firstname();
$lastname = $objCustomer->lastname();
$address = $objCustomer->address();
$city = $objCustomer->city();
$zip = $objCustomer->zip();
$country_id = $objCustomer->country_id();
$phone = $objCustomer->phone();
$fax = $objCustomer->fax();
$email = $objCustomer->email();
$companynote = $objCustomer->companynote();
$is_reseller = $objCustomer->is_reseller();
$registerdate = $objCustomer->getRegistrationDate();
$active = $objCustomer->active();
$customer_group_id = $objCustomer->group_id();
$lang_id = $objCustomer->getFrontendLanguage();
} else {
self::$pageTitle = $_ARRAYLANG['TXT_ADD_NEW_CUSTOMER'];
self::$objTemplate->setVariable('SHOP_SEND_LOGING_DATA_STATUS', \Html::ATTRIBUTE_CHECKED);
$customer_id = null;
}
self::$objTemplate->setVariable(array('SHOP_CUSTOMERID' => $customer_id, 'SHOP_COMPANY' => $company, 'SHOP_GENDER_MENUOPTIONS' => Customers::getGenderMenuoptions($gender), 'SHOP_LASTNAME' => $lastname, 'SHOP_FIRSTNAME' => $firstname, 'SHOP_ADDRESS' => $address, 'SHOP_ZIP' => $zip, 'SHOP_CITY' => $city, 'SHOP_EMAIL' => $email, 'SHOP_PHONE' => $phone, 'SHOP_FAX' => $fax, 'SHOP_USERNAME' => $username, 'SHOP_PASSWORD' => $password, 'SHOP_COMPANY_NOTE' => $companynote, 'SHOP_REGISTER_DATE' => date(ASCMS_DATE_FORMAT_DATETIME, $registerdate), 'SHOP_COUNTRY_MENUOPTIONS' => \Cx\Core\Country\Controller\Country::getMenuoptions($country_id), 'SHOP_DISCOUNT_GROUP_CUSTOMER_MENUOPTIONS' => Discount::getMenuOptionsGroupCustomer($customer_group_id), 'SHOP_CUSTOMER_TYPE_MENUOPTIONS' => Customers::getTypeMenuoptions($is_reseller), 'SHOP_CUSTOMER_ACTIVE_MENUOPTIONS' => Customers::getActiveMenuoptions($active), 'SHOP_LANG_ID_MENUOPTIONS' => \FWLanguage::getMenuoptions($lang_id)));
return true;
}