示例#1
0
 public function install()
 {
     $OSCOM_Database = Registry::get('Database');
     parent::install();
     $OSCOM_Database->simpleQuery("insert into " . DB_TABLE_PREFIX . "configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable Flat Shipping', 'MODULE_SHIPPING_FLAT_STATUS', 'True', 'Do you want to offer flat rate shipping?', '6', '0', 'osc_cfg_set_boolean_value(array(\\'True\\', \\'False\\'))', now())");
     $OSCOM_Database->simpleQuery("insert into " . DB_TABLE_PREFIX . "configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Shipping Cost', 'MODULE_SHIPPING_FLAT_COST', '5.00', 'The shipping cost for all orders using this shipping method.', '6', '0', now())");
     $OSCOM_Database->simpleQuery("insert into " . DB_TABLE_PREFIX . "configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_FLAT_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'osc_cfg_use_get_tax_class_title', 'osc_cfg_set_tax_classes_pull_down_menu', now())");
     $OSCOM_Database->simpleQuery("insert into " . DB_TABLE_PREFIX . "configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Shipping Zone', 'MODULE_SHIPPING_FLAT_ZONE', '0', 'If a zone is selected, only enable this shipping method for that zone.', '6', '0', 'osc_cfg_use_get_zone_class_title', 'osc_cfg_set_zone_classes_pull_down_menu', now())");
     $OSCOM_Database->simpleQuery("insert into " . DB_TABLE_PREFIX . "configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_SHIPPING_FLAT_SORT_ORDER', '0', 'Sort order of display.', '6', '0', now())");
 }
示例#2
0
 public function install()
 {
     parent::install();
     $data = array(array('title' => 'Enable Flat Shipping', 'key' => 'MODULE_SHIPPING_FLAT_STATUS', 'value' => 'True', 'description' => 'Do you want to offer flat rate shipping?', 'group_id' => '6', 'set_function' => 'osc_cfg_set_boolean_value(array(\'True\', \'False\'))'), array('title' => 'Shipping Cost', 'key' => 'MODULE_SHIPPING_FLAT_COST', 'value' => '5.00', 'description' => 'The shipping cost for all orders using this shipping method.', 'group_id' => '6'), array('title' => 'Tax Class', 'key' => 'MODULE_SHIPPING_FLAT_TAX_CLASS', 'value' => '0', 'description' => 'Use the following tax class on the shipping fee.', 'group_id' => '6', 'use_function' => 'osc_cfg_use_get_tax_class_title', 'set_function' => 'osc_cfg_set_tax_classes_pull_down_menu'), array('title' => 'Shipping Zone', 'key' => 'MODULE_SHIPPING_FLAT_ZONE', 'value' => '0', 'description' => 'If a zone is selected, only enable this shipping method for that zone.', 'group_id' => '6', 'use_function' => 'osc_cfg_use_get_zone_class_title', 'set_function' => 'osc_cfg_set_zone_classes_pull_down_menu'), array('title' => 'Sort Order', 'key' => 'MODULE_SHIPPING_FLAT_SORT_ORDER', 'value' => '0', 'description' => 'Sort order of display.', 'group_id' => '6'));
     OSCOM::callDB('Admin\\InsertConfigurationParameters', $data, 'Site');
 }