[ Index ] |
PHP Cross Reference of osCMax 2.0.4 |
[Summary view] [Print] [Text view]
1 <?php 2 /* 3 $Id: order_total.php,v 1.0 200/05/13 00:04:53 djmonkey1 Exp $ 4 5 osCommerce, Open Source E-Commerce Solutions 6 http://www.oscommerce.com 7 8 Copyright (c) 2007 osCommerce 9 10 Released under the GNU General Public License 11 12 order_total.php is a clone of the original order_total.php class file from the catalog side 13 if you have modified the file catalog/includes/classes/order_total.php in any way 14 you will have to modify this file as well in order for your order total modules to behave the same via Order Editor 15 16 */ 17 18 class order_total { 19 var $modules; 20 21 // class constructor 22 function order_total() { 23 global $language; 24 25 if (defined('MODULE_ORDER_TOTAL_INSTALLED') && tep_not_null(MODULE_ORDER_TOTAL_INSTALLED)) { 26 $this->modules = explode(';', MODULE_ORDER_TOTAL_INSTALLED); 27 28 reset($this->modules); 29 while (list(, $value) = each($this->modules)) { 30 include(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/order_total/' . $value); 31 include(DIR_FS_CATALOG_MODULES . 'order_total/' . $value); 32 33 $class = substr($value, 0, strrpos($value, '.')); 34 $GLOBALS[$class] = new $class; 35 } 36 } 37 } 38 39 function process() { 40 $order_total_array = array(); 41 if (is_array($this->modules)) { 42 reset($this->modules); 43 while (list(, $value) = each($this->modules)) { 44 $class = substr($value, 0, strrpos($value, '.')); 45 if ($GLOBALS[$class]->enabled) { 46 $GLOBALS[$class]->process(); 47 48 for ($i=0, $n=sizeof($GLOBALS[$class]->output); $i<$n; $i++) { 49 if (tep_not_null($GLOBALS[$class]->output[$i]['title']) && tep_not_null($GLOBALS[$class]->output[$i]['text'])) { 50 $order_total_array[] = array('code' => $GLOBALS[$class]->code, 51 'title' => $GLOBALS[$class]->output[$i]['title'], 52 'text' => $GLOBALS[$class]->output[$i]['text'], 53 'value' => $GLOBALS[$class]->output[$i]['value'], 54 'sort_order' => $GLOBALS[$class]->sort_order); 55 } 56 } 57 } 58 } 59 } 60 61 return $order_total_array; 62 } 63 64 function output() { 65 $output_string = ''; 66 if (is_array($this->modules)) { 67 reset($this->modules); 68 while (list(, $value) = each($this->modules)) { 69 $class = substr($value, 0, strrpos($value, '.')); 70 if ($GLOBALS[$class]->enabled) { 71 $size = sizeof($GLOBALS[$class]->output); 72 for ($i=0; $i<$size; $i++) { 73 $output_string .= ' <tr>' . "\n" . 74 ' <td align="right" class="main">' . $GLOBALS[$class]->output[$i]['title'] . '</td>' . "\n" . 75 ' <td align="right" class="main">' . $GLOBALS[$class]->output[$i]['text'] . '</td>' . "\n" . 76 ' </tr>'; 77 } 78 } 79 } 80 } 81 82 return $output_string; 83 } 84 } 85 ?>
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 |