[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 // 3 // +----------------------------------------------------------------------+ 4 // |zen-cart Open Source E-commerce | 5 // +----------------------------------------------------------------------+ 6 // | Copyright (c) 2003 The zen-cart developers | 7 // | | 8 // | http://www.zen-cart.com/index.php | 9 // | | 10 // | Portions Copyright (c) 2003 osCommerce | 11 // +----------------------------------------------------------------------+ 12 // | This source file is subject to version 2.0 of the GPL license, | 13 // | that is bundled with this package in the file LICENSE, and is | 14 // | available through the world-wide-web at the following url: | 15 // | http://www.zen-cart.com/license/2_0.txt. | 16 // | If you did not receive a copy of the zen-cart license and are unable | 17 // | to obtain it through the world-wide-web, please send a note to | 18 // | license@zen-cart.com so we can mail you a copy immediately. | 19 // +----------------------------------------------------------------------+ 20 // $Id: ot_total.php 2150 2005-10-12 21:23:45Z wilt $ 21 // 22 23 class ot_total { 24 var $title, $output; 25 26 function ot_total() { 27 $this->code = 'ot_total'; 28 $this->title = MODULE_ORDER_TOTAL_TOTAL_TITLE; 29 $this->description = MODULE_ORDER_TOTAL_TOTAL_DESCRIPTION; 30 $this->sort_order = MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER; 31 32 $this->output = array(); 33 } 34 35 function process() { 36 global $order, $currencies; 37 $this->output[] = array('title' => $this->title . ':', 38 'text' => $currencies->format($order->info['total'], true, $order->info['currency'], $order->info['currency_value']), 39 'value' => $order->info['total']); 40 } 41 42 function check() { 43 global $db; 44 if (!isset($this->_check)) { 45 $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_TOTAL_STATUS'"); 46 $this->_check = $check_query->RecordCount(); 47 } 48 49 return $this->_check; 50 } 51 52 function keys() { 53 return array('MODULE_ORDER_TOTAL_TOTAL_STATUS', 'MODULE_ORDER_TOTAL_TOTAL_SORT_ORDER'); 54 } 55 56 function install() { 57 global $db; 58 $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('This module is installed', 'MODULE_ORDER_TOTAL_TOTAL_STATUS', 'true', '', '6', '1','zen_cfg_select_option(array(\'true\'), ', now())"); 59 $db->Execute("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', '999', 'Sort order of display.', '6', '2', now())"); 60 } 61 62 function remove() { 63 global $db; 64 $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); 65 } 66 } 67 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 16:45:43 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |