[ 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_subtotal.php 1969 2005-09-13 06:57:21Z drbyte $ 21 // 22 23 class ot_subtotal { 24 var $title, $output; 25 26 function ot_subtotal() { 27 $this->code = 'ot_subtotal'; 28 $this->title = MODULE_ORDER_TOTAL_SUBTOTAL_TITLE; 29 $this->description = MODULE_ORDER_TOTAL_SUBTOTAL_DESCRIPTION; 30 $this->sort_order = MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER; 31 32 $this->output = array(); 33 } 34 35 function process() { 36 global $order, $currencies; 37 38 $this->output[] = array('title' => $this->title . ':', 39 'text' => $currencies->format($order->info['subtotal'], true, $order->info['currency'], $order->info['currency_value']), 40 'value' => $order->info['subtotal']); 41 } 42 43 function check() { 44 global $db; 45 if (!isset($this->_check)) { 46 $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_ORDER_TOTAL_SUBTOTAL_STATUS'"); 47 $this->_check = $check_query->RecordCount(); 48 } 49 50 return $this->_check; 51 } 52 53 function keys() { 54 return array('MODULE_ORDER_TOTAL_SUBTOTAL_STATUS', 'MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER'); 55 } 56 57 function install() { 58 global $db; 59 $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_SUBTOTAL_STATUS', 'true', '', '6', '1','zen_cfg_select_option(array(\'true\'), ', now())"); 60 $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_SUBTOTAL_SORT_ORDER', '100', 'Sort order of display.', '6', '2', now())"); 61 } 62 63 function remove() { 64 global $db; 65 $db->Execute("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); 66 } 67 } 68 ?>
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 |
![]() |