sub_total.php
来自「this the oscommerce 3.0 aplha 4」· PHP 代码 · 共 55 行
PHP
55 行
<?php/* $Id: $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2006 osCommerce This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 (1991) as published by the Free Software Foundation.*/ class osC_OrderTotal_sub_total extends osC_OrderTotal_Admin { var $_title, $_code = 'sub_total', $_author_name = 'osCommerce', $_author_www = 'http://www.oscommerce.com', $_status = false, $_sort_order; function osC_OrderTotal_sub_total() { global $osC_Language; $this->_title = $osC_Language->get('order_total_subtotal_title'); $this->_description = $osC_Language->get('order_total_subtotal_description'); $this->_status = (defined('MODULE_ORDER_TOTAL_SUBTOTAL_STATUS') && (MODULE_ORDER_TOTAL_SUBTOTAL_STATUS == 'true') ? true : false); $this->_sort_order = (defined('MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER') ? MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER : null); } function isInstalled() { return (bool)defined('MODULE_ORDER_TOTAL_SUBTOTAL_STATUS'); } function install() { global $osC_Database; parent::install(); $osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Display Sub-Total', 'MODULE_ORDER_TOTAL_SUBTOTAL_STATUS', 'true', 'Do you want to display the order sub-total cost?', '6', '1', 'osc_cfg_set_boolean_value(array(\'true\', \'false\'))', now())"); $osC_Database->simpleQuery("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', '1', 'Sort order of display.', '6', '2', now())"); } function getKeys() { if (!isset($this->_keys)) { $this->_keys = array('MODULE_ORDER_TOTAL_SUBTOTAL_STATUS', 'MODULE_ORDER_TOTAL_SUBTOTAL_SORT_ORDER'); } return $this->_keys; } }?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?