本文整理汇总了PHP中Customers::getSortMenuoptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Customers::getSortMenuoptions方法的具体用法?PHP Customers::getSortMenuoptions怎么用?PHP Customers::getSortMenuoptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Customers
的用法示例。
在下文中一共展示了Customers::getSortMenuoptions方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;