[ Index ] |
PHP Cross Reference of osCMax 2.0.4 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 $Id: ot_total.php 3 2006-05-27 04:59:07Z user $ 4 5 osCMax Power E-Commerce 6 http://oscdox.com 7 8 Copyright 2006 osCMax 9 10 Released under the GNU General Public License 11 */ 12 13 class ot_total { 14 var $title, $output; 15 16 function ot_total() { 17 $this->code = 'ot_total'; 18 $this->title = MODULE_ORDER_TOTAL_TOTAL_TITLE; 19 $this->description = MODULE_ORDER_TOTAL_TOTAL_DESCRIPTION; 20 $this->enabled = ((MODULE_ORDER_TOTAL_TOTAL_STATUS == 'true') ? true : false); 21 $this->sort_order = MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER; 22 23 $this->output = array(); 24 } 25 26 function process() { 27 global $order, $currencies; 28 29 $this->output[] = array('title' => $this->title . ':', 30 'text' => '<b>' . $currencies->format($order->info['total'], true, $order->info['currency'], $order->info['currency_value']) . '</b>', 31 'value' => $order->info['total']); 32 } 33 34 function check() { 35 if (!isset($this->_check)) { 36 $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_TOTAL_STATUS'"); 37 $this->_check = tep_db_num_rows($check_query); 38 } 39 40 return $this->_check; 41 } 42 43 function keys() { 44 return array('MODULE_ORDER_TOTAL_TOTAL_STATUS', 'MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER'); 45 } 46 47 function install() { 48 tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Total', 'MODULE_ORDER_TOTAL_TOTAL_STATUS', 'true', 'Do you want to display the total order value?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); 49 tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER', '4', 'Sort order of display.', '6', '2', now())"); 50 } 51 52 function remove() { 53 tep_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); 54 } 55 } 56 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Jan 1 13:43:16 2010 | Cross-referenced by PHPXref 0.7 |