Annotated File View
hpdl
|
620
|
1
|
<?php
|
|
2
|
/*
|
|
3
|
$Id: $
|
|
4
|
|
|
5
|
osCommerce, Open Source E-Commerce Solutions
|
|
6
|
http://www.oscommerce.com
|
|
7
|
|
|
8
|
Copyright (c) 2006 osCommerce
|
|
9
|
|
|
10
|
Released under the GNU General Public License
|
|
11
|
*/
|
|
12
|
|
|
13
|
class osC_OrderTotal_low_order_fee extends osC_OrderTotal_Admin {
|
|
14
|
var $_title,
|
|
15
|
$_code = 'low_order_fee',
|
|
16
|
$_author_name = 'osCommerce',
|
|
17
|
$_author_www = 'http://www.oscommerce.com',
|
|
18
|
$_status = false,
|
|
19
|
$_sort_order;
|
|
20
|
|
|
21
|
function osC_OrderTotal_low_order_fee() {
|
|
22
|
global $osC_Language;
|
|
23
|
|
|
24
|
$this->_title = $osC_Language->get('order_total_loworderfee_title');
|
|
25
|
$this->_description = $osC_Language->get('order_total_loworderfee_description');
|
|
26
|
$this->_status = (defined('MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS') && (MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS == 'true') ? true : false);
|
|
27
|
$this->_sort_order = (defined('MODULE_ORDER_TOTAL_LOWORDERFEE_SORT_ORDER') ? MODULE_ORDER_TOTAL_LOWORDERFEE_SORT_ORDER : null);
|
|
28
|
}
|
|
29
|
|
|
30
|
function isInstalled() {
|
|
31
|
return (bool)defined('MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS');
|
|
32
|
}
|
|
33
|
|
|
34
|
function install() {
|
|
35
|
global $osC_Database;
|
|
36
|
|
|
37
|
parent::install();
|
|
38
|
|
hpdl
|
758
|
39
|
$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 Low Order Fee', 'MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS', 'true', 'Do you want to display the low order fee?', '6', '1', 'osc_cfg_set_boolean_value(array(\'true\', \'false\'))', now())");
|
hpdl
|
620
|
40
|
$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_LOWORDERFEE_SORT_ORDER', '4', 'Sort order of display.', '6', '2', now())");
|
frank
|
1179
|
41
|
$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 ('Allow Low Order Fee', 'MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE', 'false', 'Do you want to allow low order fees?', '6', '3', 'osc_cfg_set_boolean_value(array(\'true\', \'false\'))', now())");
|
hpdl
|
620
|
42
|
$osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Order Fee For Orders Under', 'MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER', '50', 'Add the low order fee to orders under this amount.', '6', '4', 'currencies->format', now())");
|
|
43
|
$osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('Order Fee', 'MODULE_ORDER_TOTAL_LOWORDERFEE_FEE', '5', 'Low order fee.', '6', '5', 'currencies->format', now())");
|
hpdl
|
758
|
44
|
$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 ('Attach Low Order Fee On Orders Made', 'MODULE_ORDER_TOTAL_LOWORDERFEE_DESTINATION', 'both', 'Attach low order fee for orders sent to the set destination.', '6', '6', 'osc_cfg_set_boolean_value(array(\'national\', \'international\', \'both\'))', now())");
|
|
45
|
$osC_Database->simpleQuery("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS', '0', 'Use the following tax class on the low order fee.', '6', '7', 'osc_cfg_use_get_tax_class_title', 'osc_cfg_set_tax_classes_pull_down_menu', now())");
|
hpdl
|
620
|
46
|
}
|
|
47
|
|
|
48
|
function getKeys() {
|
|
49
|
if (!isset($this->_keys)) {
|
|
50
|
$this->_keys = array('MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS',
|
|
51
|
'MODULE_ORDER_TOTAL_LOWORDERFEE_SORT_ORDER',
|
|
52
|
'MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE',
|
|
53
|
'MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER',
|
|
54
|
'MODULE_ORDER_TOTAL_LOWORDERFEE_FEE',
|
|
55
|
'MODULE_ORDER_TOTAL_LOWORDERFEE_DESTINATION',
|
|
56
|
'MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS');
|
|
57
|
}
|
|
58
|
|
|
59
|
return $this->_keys;
|
|
60
|
}
|
|
61
|
}
|
|
62
|
?>
|
|