コード例 #1
1
 function getOrderStatusSelect($select)
 {
     OrderStatus::init();
     return AHtml::getFilterSelect('order_status', 'Order Status', OrderStatus::$map, $select, false, '', 'value', 'text');
 }
コード例 #2
1
 function td_getOrderStatusSelect($select, $id)
 {
     OrderStatus::init();
     return JHtmlSelect::genericlist(OrderStatus::$map, $id, 'class="td_orderstatus input-small"', 'value', 'text', $select);
 }
コード例 #3
0
 function getOrderStatusSelect()
 {
     OrderStatus::init();
     $options = OrderStatus::$map;
     $options[] = array('value' => '0', 'text' => 'All');
     return JHTML::_('select.genericlist', $options, 'filter_order_status', ' class="inputbox input-medium" title="' . JText::_('COM_BOOKPRO_ORDER_STATUS') . '"', 'value', 'text', $this->state->get('filter.order_status'), 'filter_order_status');
 }
コード例 #4
0
 public function save()
 {
     try {
         $this->_db->transactionStart();
         //save customer
         $customer_id = $this->saveCustomer();
         if (!$customer_id) {
             $this->writeLog('Save customer failed');
             return false;
         }
         //save order
         AImporter::helper('orderstatus');
         OrderStatus::init();
         $order_status = OrderStatus::$PENDING->getValue();
         $this->data = array('type' => 'CUSTOMIZE', 'user_id' => $customer_id, 'pay_method' => '', 'promo_code' => $this->customer['promo_code'], 'order_status' => $order_status, 'pay_status' => 'PENDING', 'notes' => $this->customer['notes']);
         if (!$this->store()) {
             $this->writeLog('Save order failed');
             return false;
         }
         if (!$this->saveOrderInfo()) {
             $this->writeLog('Save orderinfo failed');
             return false;
         }
         $this->table->order_number = 'CS' . $this->table->order_number;
         $this->table->store();
         $this->_db->transactionCommit();
     } catch (Exception $e) {
         $this->writeLog($e->getMessage());
         $this->_db->transactionRollback();
         return false;
     }
     return true;
 }
コード例 #5
0
 public function save()
 {
     try {
         $this->_db->transactionStart();
         //save customer
         $customer_id = $this->saveCustomer();
         if (!$customer_id) {
             $this->writeLog('Save customer failed');
             return false;
         }
         //save order
         AImporter::helper('orderstatus');
         OrderStatus::init();
         $order_status = OrderStatus::$PENDING->getValue();
         $this->data = array('type' => 'TRANSPORT', 'user_id' => $customer_id, 'pay_method' => '', 'promo_code' => $this->customer['promo_code'], 'order_status' => $order_status, 'pay_status' => 'PENDING', 'notes' => $this->customer['notes'], 'tax' => $this->cart->tax, 'service_fee' => $this->cart->service_fee);
         $this->setPrice();
         $this->addCoupon();
         if (!$this->store()) {
             $this->writeLog('Save order failed');
         }
         if (!$this->savePassenger()) {
             $this->writeLog('Save passenger failed');
         }
         if (!$this->saveOrderInfo()) {
             $this->writeLog('Save orderinfo failed');
         }
         if (!$this->saveAddon()) {
             $this->writeLog('Save addon failed');
         }
         if (!$this->saveOrderInfoStop()) {
             $this->writeLog('Save orderinfo stop failed');
         }
         //save order number
         $this->table->order_number = $this->cart->filter['type'] == 1 ? 'PR' . $this->table->order_number : 'SR' . $this->table->order_number;
         $this->table->store();
         $this->_db->transactionCommit();
     } catch (Exception $e) {
         $this->writeLog($e->getMessage());
         $this->_db->transactionRollback();
         return false;
     }
     return true;
 }
コード例 #6
0
 function getOrderStatusSelect()
 {
     OrderStatus::init();
     return AHtml::getFilterSelect('filter_order_status', JText::_('COM_BOOKPRO_SELECT_ORDER_STATUS'), OrderStatus::$map, $this->state->get('filter.order_status'), true, 'class="input input-medium"', 'value', 'text');
 }
コード例 #7
0
<?php

/**
 * @package 	Bookpro
 * @author 		Ngo Van Quan
 * @link 		http://joombooking.com
 * @copyright 	Copyright (C) 2011 - 2012 Ngo Van Quan
 * @license 	GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 * @version 	$Id: defines.php 104 2012-08-29 18:01:09Z quannv $
 **/
defined('_JEXEC') or die('Restricted access');
if (!defined('DS')) {
    define('DS', DIRECTORY_SEPARATOR);
}
//Display component name
define('COMPONENT_NAME', 'BookPro');
//Unique component option use for navigation in Joomla!
define('OPTION', 'com_bookpro');
define('CONTROLLER', 'BookproController');
define('NAME', 'bookpro');
//default component encoding
define('ENCODING', 'UTF-8');
define('ADMIN_ROOT', JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . OPTION);
define('SITE_ROOT', JPATH_ROOT . DS . 'components' . DS . OPTION);
//Component table prefix
define('PREFIX', 'bookpro');
AImporter::helper('factory');
AImporter::helper('factory', 'html', 'orderstatus');
OrderStatus::init();
define('ADMIN_VIEWS', ADMIN_ROOT . DS . 'views');
define('SITE_VIEWS', SITE_ROOT . DS . 'views');