本文整理汇总了PHP中message::getState方法的典型用法代码示例。如果您正苦于以下问题:PHP message::getState方法的具体用法?PHP message::getState怎么用?PHP message::getState使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类message
的用法示例。
在下文中一共展示了message::getState方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
//.........这里部分代码省略.........
$this->session->data['quick_order_pro_success'][$this->form_id] = $template_info['success_message'];
}
$this->redirect($redirect);
}
$this->data['total'] = false;
$this->data['fields'] = field::renderFields($template_info['fields']);
if ($this->data['type'] == '1') {
// product
if ($product_info['quantity'] <= 0 && !$template_info['stock_checkout']) {
return;
}
$this->data['product_info'] = array('name' => $product_info['name'], 'option' => array(), 'quantity' => $product_info['minimum']);
if ($template_info['use_option'] && $template_info['show_option']) {
foreach ($this->model_catalog_product->getProductOptions($this->request->get['product_id']) as $option) {
if (in_array($option['type'], array('text', 'textarea', 'date', 'datetime', 'time')) && !empty($option['option_value'])) {
$this->data['product_info']['option'][] = array('name' => $option['name'], 'value' => utf8_strlen($option['option_value']) > 20 ? utf8_substr($option['option_value'], 0, 20) . '..' : $option['option_value']);
}
}
}
if ($template_info['show_total']) {
if ($this->config->get('config_customer_price') && $this->customer->isLogged() || !$this->config->get('config_customer_price')) {
$total = $product_info['price'];
}
if ((double) $product_info['special']) {
$total = $product_info['special'];
}
$quantity = $product_info['minimum'];
if ($total && $quantity) {
$this->data['total'] = $this->currency->format($this->calculateTax($total, $quantity, $product_info['tax_class_id']));
}
}
} else {
if ($template_info['show_total']) {
// Totals
$this->load->model('setting/extension');
$total_data = array();
$total = 0;
$taxes = $this->cart->getTaxes();
// Display prices
if ($this->config->get('config_customer_price') && $this->customer->isLogged() || !$this->config->get('config_customer_price')) {
$sort_order = array();
$results = $this->model_setting_extension->getExtensions('total');
foreach ($results as $key => $value) {
$sort_order[$key] = $this->config->get($value['code'] . '_sort_order');
}
array_multisort($sort_order, SORT_ASC, $results);
foreach ($results as $result) {
if ($this->config->get($result['code'] . '_status')) {
$this->load->model('total/' . $result['code']);
$this->{'model_total_' . $result['code']}->getTotal($total_data, $total, $taxes);
}
}
}
$this->data['total'] = $this->currency->format($total);
}
}
$this->document->addScript('catalog/view/javascript/quick_order_pro/quick_order_pro.js');
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/stylesheet/quick_order_pro.css')) {
$this->document->addStyle('catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/quick_order_pro.css');
} else {
$this->document->addStyle('catalog/view/theme/default/stylesheet/quick_order_pro.css');
}
$language_id = $this->config->get('config_language_id');
$this->data['text_process'] = $this->language->get('text_process');
$this->data['text_required'] = $this->language->get('text_required');
$this->data['text_total'] = $this->language->get('text_total');
if (!empty($template_info['button'][$language_id])) {
$this->data['button_send'] = $template_info['button'][$language_id];
} else {
$this->data['button_send'] = $this->language->get('button_send');
}
if (array_key_exists($language_id, $template_info['title']) && $this->_stripText($template_info['title'][$language_id]) != '') {
$this->data['heading_title'] = $template_info['title'][$language_id];
} else {
$this->data['heading_title'] = FALSE;
}
if (array_key_exists($language_id, $template_info['description']) && $this->_stripText($template_info['description'][$language_id]) != '') {
$this->data['description'] = html_entity_decode($template_info['description'][$language_id], ENT_QUOTES, 'UTF-8');
} else {
$this->data['description'] = FALSE;
}
$class = $position;
if ($this->_stripText($template_info['class']) != '') {
$class .= ' ' . $this->_stripText($template_info['class']);
}
$this->data['class'] = $class;
$this->data['template_info'] = $template_info;
$this->data['item_id'] = self::$item_id;
if (!empty(oc::registry()->message->data['error'])) {
if (array_key_exists('fields', oc::registry()->message->data['error'])) {
unset(oc::registry()->message->data['error']['fields']);
}
$this->data['error'] = oc::registry()->message->data['error'];
} else {
$this->data['error'] = NULL;
}
$this->data['success'] = message::getState('success', $this->form_id, 'success');
$this->template = tpl::find($position, id::decode($this->form_id));
$this->render();
}
示例2:
?>
</td>
<td><?php
echo $row->getContent();
?>
</td>
<td><?php
echo $row->getLuncher();
?>
</td>
<td><?php
echo $row->getDate();
?>
</td>
<td><?php
if ($row->getState() == 0) {
?>
<a href="<?php
echo "confirm_notice.php?nid=" . $row->getId();
?>
" <lable class="btn btn-success">确认通知</lable>
<?php
} else {
?>
<lable class="btn btn-primary">已确认</lable>
<?php
}
?>
</td></tr>
<?php
}