Permalink
Browse files

Revert "COD Payment Module set up for Shipping methods"

This reverts commit 2ec9089.
  • Loading branch information...
1 parent 2ec9089 commit acc2a6d9c39112277a175fb06dfbaf394ef05279 @tgely committed Sep 3, 2010
@@ -99,8 +99,7 @@ public function install() {
parent::install();
- $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 ('Enable Cash On Delivery Module', 'MODULE_PAYMENT_COD_STATUS', '-1', 'Do you want to accept Cash On Delivery payments?<br />', '6', '0', 'osc_cfg_use_get_boolean_value', 'osc_cfg_set_boolean_value(array(1, -1))', now())");
- $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 ('Shipping methods', 'MODULE_PAYMENT_COD_ACCEPTED_SHIPPING_TYPES', '', 'Accept these shipping methods for this payment method.<br />', '6', '0', 'osc_cfg_set_shipping_methods_checkbox_field', 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 ('Enable Cash On Delivery Module', 'MODULE_PAYMENT_COD_STATUS', '-1', 'Do you want to accept Cash On Delivery payments?', '6', '0', 'osc_cfg_use_get_boolean_value', 'osc_cfg_set_boolean_value(array(1, -1))', 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 ('Payment Zone', 'MODULE_PAYMENT_COD_ZONE', '0', 'If a zone is selected, only enable this payment 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 of display.', 'MODULE_PAYMENT_COD_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '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, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_COD_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'osc_cfg_set_order_statuses_pull_down_menu', 'osc_cfg_use_get_order_status_title', now())");
@@ -116,7 +115,6 @@ public function install() {
public function getKeys() {
if ( !isset($this->_keys) ) {
$this->_keys = array('MODULE_PAYMENT_COD_STATUS',
- 'MODULE_PAYMENT_COD_ACCEPTED_SHIPPING_TYPES',
'MODULE_PAYMENT_COD_ZONE',
'MODULE_PAYMENT_COD_ORDER_STATUS_ID',
'MODULE_PAYMENT_COD_SORT_ORDER');
@@ -57,14 +57,6 @@ public function __construct() {
$this->_status = false;
}
}
-
- $valid_shipping = preg_split("/[,]/", MODULE_PAYMENT_COD_ACCEPTED_SHIPPING_TYPES);
- $selected_shipping_module = array($OSCOM_ShoppingCart->getShippingMethod('id'));
- $check_flag = in_array($selected_shipping_module[0], $valid_shipping);
-
- if ( $check_flag === false ) {
- $this->_status = false;
- }
}
}

0 comments on commit acc2a6d

Please sign in to comment.