コード例 #1
0
 function SetViewTitle($view = '', $msg = '')
 {
     if ($view == '') {
         $view = $this->getName();
     }
     if ($msg) {
         $msg = ' <span style="font-size:90%">' . $msg . '</span>';
     }
     //$text = strtoupper('COM_VIRTUEMART_'.$name );
     $viewText = JText::_('COM_VIRTUEMART') . ' : ' . ShopFunctions::altText($view);
     if (!($task = JRequest::getWord('task'))) {
         $task = 'list';
     }
     $taskName = ShopFunctions::altText($task);
     $taskName = ' <small><small>[ ' . $taskName . ' ]</small></small>';
     if ($task === 'add') {
         $task = 'new';
     } elseif ($task === 'editshop') {
         $task = 'edit';
     }
     JToolBarHelper::title($viewText . ' ' . $taskName . $msg, $task . ' head vm_' . $view . '_48');
     $document = JFactory::getDocument();
     $title = $document->getTitle();
     $document->setTitle(trim(strip_tags($title)));
     $this->viewName = $viewText;
     //was $viewName?
 }
コード例 #2
0
    $checked = JHTML::_('grid.id', $i, $row->virtuemart_orderstate_id);
    $coreStatus = in_array($row->order_status_code, $this->lists['vmCoreStatusCode']);
    $checked = $coreStatus ? '<span class="hasTooltip" title="' . JText::_('COM_VIRTUEMART_ORDER_STATUS_CODE_CORE') . '">' . $image . '</span>' : JHTML::_('grid.id', $i, $row->virtuemart_orderstate_id);
    ?>
			<tr >
				<td width="10">
					<?php 
    echo $checked;
    ?>
				</td>
				<td align="left">
					<?php 
    echo $this->editLink($row->virtuemart_orderstate_id, $row->order_status_name, 'virtuemart_orderstate_id');
    ?>
					<?php 
    echo " (" . ShopFunctions::altText($row->order_status_name, 'COM_VIRTUEMART_ORDER_STATUS') . ")";
    ?>
					<?php 
    if ($row->order_status_description) {
        echo '<div class="small">' . JText::_($row->order_status_description) . '</div>';
    }
    ?>
				</td>
				<td align="left">
					<?php 
    echo $row->order_status_code;
    ?>
				</td>
				<td align="left">
					<?php 
    echo JText::_($this->stockHandelList[$row->order_stock_handle]);
コード例 #3
0
    public function renderOrderstatesList()
    {
        $orderstates = JRequest::getVar('order_status_code', 'C');
        //print_r($orderstates);
        $query = 'SELECT `order_status_code` as value, `order_status_name` as text
			FROM `#__virtuemart_orderstates`
			WHERE published=1 ';
        $this->_db->setQuery($query);
        $list = $this->_db->loadObjectList();
        foreach ($list as $state) {
            $state->text = ShopFunctions::altText($state->text, 'COM_VIRTUEMART_ORDER_STATUS');
        }
        //$html = VmHTML::select ('order_status_code[]', $list, $orderstates, 'size="7" class="inputbox" onchange="this.form.submit();" multiple="multiple"');
        $html = VmHTML::select('order_status_code[]', $list, $orderstates, 'size="7" class="input-xlarge"  multiple="multiple"');
        return $html;
    }
コード例 #4
0
 /**
  * Gets the total number of orders with the given status
  *
  * @author Patrick Kohl
  * @author RickG
  * @return int Total number of orders with the given status
  */
 function getTotalOrdersByStatus()
 {
     $query = 'SELECT s.`order_status_name`, s.`order_status_code` as code, s.`order_stock_handle`, ';
     $query .= '(SELECT count(*) FROM `#__virtuemart_orders` WHERE `#__virtuemart_orders`.`order_status` = code ) as order_count ';
     $query .= 'FROM `#__virtuemart_orderstates` as s';
     $this->_db->setQuery($query);
     $status = $this->_db->loadObjectList('code');
     foreach ($status as $state) {
         $state->order_status_name = ShopFunctions::altText($state->order_status_name, 'COM_VIRTUEMART_ORDER_STATUS');
     }
     return $status;
 }