本文整理汇总了PHP中Status::getStatuses方法的典型用法代码示例。如果您正苦于以下问题:PHP Status::getStatuses方法的具体用法?PHP Status::getStatuses怎么用?PHP Status::getStatuses使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Status
的用法示例。
在下文中一共展示了Status::getStatuses方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initStatuses
private function initStatuses()
{
$this->data['statuses'] = array();
foreach (Status::getStatuses(GROUP_ORDER_ITEM_STATUS, $this->config->get('language_id')) as $statusId => $status) {
$this->data['statuses'][GROUP_ORDER_ITEM_STATUS][] = array('id' => $statusId, 'name' => $status, 'settable' => true, 'viewable' => true, 'set_status_url' => $this->url->link('sale/order_items/set_status', "order_item_new_status={$statusId}&token=" . $this->parameters['token'], 'SSL'));
}
foreach (Status::getStatuses(GROUP_REPURCHASE_ORDER_ITEM_STATUS, $this->config->get('language_id')) as $statusId => $status) {
$this->data['statuses'][GROUP_REPURCHASE_ORDER_ITEM_STATUS][] = array('id' => $statusId, 'name' => $status);
}
}
示例2: initStatuses
private function initStatuses()
{
$this->data['statuses'] = array();
foreach (Status::getStatuses(GROUP_REPURCHASE_ORDER_ITEM_STATUS, $this->config->get('config_language_id')) as $statusId => $status) {
$this->data['statuses'][] = array('statusId' => $statusId, 'name' => $status);
}
}
示例3: getList
private function getList()
{
if (isset($this->request->get['filter_order_id'])) {
$filter_order_id = $this->request->get['filter_order_id'];
} else {
$filter_order_id = null;
}
if (isset($this->request->get['filter_customer'])) {
$filter_customer = $this->request->get['filter_customer'];
} else {
$filter_customer = null;
}
if (isset($this->request->get['filter_order_status_id'])) {
$filter_order_status_id = $this->request->get['filter_order_status_id'];
} else {
$filter_order_status_id = null;
}
if (isset($this->request->get['filter_total'])) {
$filter_total = $this->request->get['filter_total'];
} else {
$filter_total = null;
}
if (isset($this->request->get['filter_date_added'])) {
$filter_date_added = $this->request->get['filter_date_added'];
} else {
$filter_date_added = null;
}
if (isset($this->request->get['filter_date_modified'])) {
$filter_date_modified = $this->request->get['filter_date_modified'];
} else {
$filter_date_modified = null;
}
if (isset($this->request->get['sort'])) {
$sort = $this->request->get['sort'];
} else {
$sort = 'o.order_id';
}
if (isset($this->request->get['order'])) {
$order = $this->request->get['order'];
} else {
$order = 'DESC';
}
if (isset($this->request->get['page'])) {
$page = $this->request->get['page'];
} else {
$page = 1;
}
$url = '';
if (isset($this->request->get['filter_order_id'])) {
$url .= '&filter_order_id=' . $this->request->get['filter_order_id'];
}
if (isset($this->request->get['filter_customer'])) {
$url .= '&filter_customer=' . $this->request->get['filter_customer'];
}
if (isset($this->request->get['filter_order_status_id'])) {
$url .= '&filter_order_status_id=' . $this->request->get['filter_order_status_id'];
}
if (isset($this->request->get['filter_total'])) {
$url .= '&filter_total=' . $this->request->get['filter_total'];
}
if (isset($this->request->get['filter_date_added'])) {
$url .= '&filter_date_added=' . $this->request->get['filter_date_added'];
}
if (isset($this->request->get['filter_date_modified'])) {
$url .= '&filter_date_modified=' . $this->request->get['filter_date_modified'];
}
if (isset($this->request->get['sort'])) {
$url .= '&sort=' . $this->request->get['sort'];
}
if (isset($this->request->get['order'])) {
$url .= '&order=' . $this->request->get['order'];
}
if (isset($this->request->get['page'])) {
$url .= '&page=' . $this->request->get['page'];
}
$this->data['breadcrumbs'] = array();
$this->data['breadcrumbs'][] = array('text' => $this->language->get('text_home'), 'href' => $this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL'), 'separator' => false);
$this->data['breadcrumbs'][] = array('text' => $this->language->get('heading_title'), 'href' => $this->url->link('sale/order', 'token=' . $this->session->data['token'] . $url, 'SSL'), 'separator' => ' :: ');
$this->data['urlCloseOrder'] = $this->url->link('sale/order/setStatus', 'token=' . $this->session->data['token'] . '&orderStatusId=' . ORDER_STATUS_FINISHED, 'SSL');
$this->data['invoice'] = $this->url->link('sale/order/invoice', 'token=' . $this->session->data['token'], 'SSL');
$this->data['delete'] = $this->url->link('sale/order/delete', 'token=' . $this->session->data['token'] . $url, 'SSL');
$this->data['orders'] = array();
$data = array('filter_order_id' => $filter_order_id, 'filter_customer' => $filter_customer, 'filter_order_status_id' => $filter_order_status_id, 'filter_total' => $filter_total, 'filter_date_added' => $filter_date_added, 'filter_date_modified' => $filter_date_modified, 'sort' => $sort, 'order' => $order, 'start' => ($page - 1) * $this->config->get('config_admin_limit'), 'limit' => $this->config->get('config_admin_limit'));
$order_total = $this->modelSaleOrder->getTotalOrders($data);
$results = $this->modelSaleOrder->getOrders($data);
$this->load->library('Status');
$statuses = Status::getStatuses(GROUP_ORDER_STATUS, (int) $this->config->get('config_language_id'));
foreach ($results as $result) {
// $this->model_sale_order->updateOrderTotals($result['order_id']);
$action = array();
$action[] = array('text' => $this->language->get('text_view'), 'href' => $this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=' . $result['order_id'] . $url, 'SSL'));
/*
Commented out until I can finish the order editing system.
$action[] = array(
'text' => $this->language->get('text_edit'),
'href' => $this->url->link('sale/order/update', 'token=' . $this->session->data['token'] . '&order_id=' . $result['order_id'] . $url, 'SSL')
);
*/
$this->data['orders'][] = array('order_id' => $result['order_id'], 'customer' => $result['customer'], 'status' => isset($statuses[$result['status_id']]) ? $statuses[$result['status_id']] : $result['status'], 'statusId' => $result['status_id'], 'total' => $this->currency->format($result['total'], $result['currency_code'], $result['currency_value']), 'date_added' => date($this->language->get('date_format_short'), strtotime($result['date_added'])), 'date_modified' => date($this->language->get('date_format_short'), strtotime($result['date_modified'])), 'selected' => isset($this->request->post['selected']) && in_array($result['order_id'], $this->request->post['selected']), 'action' => $action);
}
//.........这里部分代码省略.........
示例4: foreach
<?php
require_once "../initialize.php";
$html = "";
$statuses = Status::getStatuses($_GET['itemid'], $_GET['itemtype']);
if (count($statuses) > 0) {
foreach ($statuses as $status) {
$html .= '<div class="well well-small">';
$html .= $status->status;
$html .= ' <p><span class="messagedate pull-right">' . $status->date . '</span></p>';
$html .= '</div>';
}
} else {
$html .= '<div class="well well-small">';
$html .= ' No statuses yet';
$html .= ' <p><span class="messagedate pull-right">October 3, 1992</span></p>';
$html .= '</div>';
}
echo $html;
示例5: getList
private function getList()
{
$ordersPerPage = 10;
$this->data['orders'] = array();
$this->data['statuses'] = Status::getStatuses(GROUP_REPURCHASE_ORDER_ITEM_STATUS, $this->config->get('language_id'), true);
$data = $this->parameters;
$data['filterCustomerId'] = $this->getCurrentCustomer()->getId();
unset($data['page']);
$data['start'] = ($this->parameters['page'] - 1) * $ordersPerPage;
// $this->config->get("config_catalog_limit");
$data['limit'] = $ordersPerPage;
// $this->config->get("config_catalog_limit");
$data['order'] = 'DESC';
foreach (RepurchaseOrderDAO::getInstance()->getOrders($data) as $repurchase_order) {
if (file_exists(DIR_IMAGE . $repurchase_order['imagePath'])) {
$imagePath = $this->load->model('tool/image')->resize($repurchase_order['imagePath'], 100, 100);
$warningHint = '';
} else {
$imagePath = $this->load->model('tool/image')->resize('no_image.jpg', 100, 100);
$warningHint = $this->language->get('WARNING_HTML_PAGE_PROVIDED');
}
if ($repurchase_order['status'] == REPURCHASE_ORDER_ITEM_STATUS_OFFER) {
$textAccept = $this->language->get('ACCEPT');
} else {
if ($repurchase_order['status'] == REPURCHASE_ORDER_ITEM_STATUS_WAITING) {
$textAccept = $this->language->get('UNCONDITIONALLY_ACCEPT');
} else {
$textAccept = null;
}
}
$this->data['orders'][] = array('comment' => $repurchase_order['comment'], 'hint' => $warningHint, 'orderItemId' => $repurchase_order['orderItemId'], 'imagePath' => $imagePath, 'imageUrl' => $repurchase_order['imagePath'], 'itemUrl' => $repurchase_order['itemUrl'], 'options' => OrderItemDAO::getInstance()->getOptions($repurchase_order['orderItemId']), 'price' => $this->currency->format($repurchase_order['price']), 'quantity' => $repurchase_order['quantity'], 'shipping' => $this->currency->format($repurchase_order['shipping']), 'statusId' => $repurchase_order['status'], 'statusName' => Status::getStatus($repurchase_order['status'], $this->config->get('config_language_id'), true), 'timeAdded' => $repurchase_order['timeAdded'], 'subtotal' => $this->currency->format($repurchase_order['subtotal']), 'textAccept' => $textAccept, 'total' => $this->currency->format($repurchase_order['total']));
}
// $this->log->write(print_r($this->data['orders'], true));
/// Set interface
$this->setBreadcrumbs();
$this->data['textComment'] = $this->language->get('COMMENT');
$this->data['textFilter'] = $this->language->get('FILTER');
$this->data['textFilterBy'] = $this->language->get('FILTER_BY');
$this->data['textTimeAdded'] = $this->language->get('TIME_ADDED');
$this->data['textNoItems'] = $this->language->get('NO_ITEMS');
$this->data['textOrderItemId'] = $this->language->get('ORDER_ITEM_ID');
$this->data['textPrice'] = $this->language->get('PRICE');
$this->data['textQuantity'] = $this->language->get('QUANTITY');
$this->data['textReject'] = $this->language->get('REJECT');
$this->data['textShipping'] = $this->language->get('SHIPPING');
$this->data['textStatus'] = $this->language->get('STATUS');
$this->data['textSubtotal'] = $this->language->get('SUBTOTAL');
$this->data['textAddToCart'] = $this->language->get('ADDTOCART');
$this->data['textTotal'] = $this->language->get('TOTAL');
$this->data['urlRepurchaseOrders'] = $this->url->link('account/repurchaseOrders', '', 'SSL');
$template_name = '/template/account/repurchaseOrdersList.tpl.php';
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . $template_name)) {
$this->template = $this->config->get('config_template') . $template_name;
} else {
$this->template = 'default' . $template_name;
}
$this->children = array('common/column_right', 'common/column_left', 'common/content_top', 'common/content_bottom', 'common/footer', 'common/header');
$filterParams = array();
foreach ($this->parameters as $key => $value) {
if (!(strpos($key, 'filter') === false)) {
$filterParams[$key] = $value;
}
}
$urlFilterParameters = $this->buildUrlParameterString($filterParams);
$urlParameters = $urlFilterParameters . '&page=' . $this->parameters['page'];
$pagination = new Pagination();
$pagination->total = RepurchaseOrderDAO::getInstance()->getOrdersCount($data);
$pagination->page = $this->parameters['page'];
$pagination->limit = $ordersPerPage;
//$this->config->get("config_catalog_limit");
$pagination->text = $this->language->get('text_pagination');
$pagination->url = $this->url->link('account/repurchaseOrders', str_replace('page=' . $this->parameters['page'], 'page={page}', $urlParameters), 'SSL');
$this->data['pagination'] = $pagination->render();
$this->data = array_merge($this->data, $this->parameters);
$this->getResponse()->setOutput($this->render());
}