Permalink
Browse files

Reset COD module for make perfect

Signed-off-by: Gergely <t-gely@freemail.hu>
  • Loading branch information...
1 parent 94c901c commit b11cfcb9cd10fe5e17b7d9933e8d8a64b9e2b54a @tgely committed Aug 8, 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_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_TYPES',
'MODULE_PAYMENT_COD_ZONE',
'MODULE_PAYMENT_COD_ORDER_STATUS_ID',
'MODULE_PAYMENT_COD_SORT_ORDER');
@@ -3,17 +3,17 @@
<definitions>
<definition>
<key>payment_cod_title</key>
- <value><![CDATA[Cash on Delivery by Shippings]]></value>
+ <value><![CDATA[Cash on Delivery]]></value>
<group>modules-payment</group>
</definition>
<definition>
<key>payment_cod_description</key>
- <value><![CDATA[Cash on Delivery with Settings of Shipping's Dependencies]]></value>
+ <value><![CDATA[Cash on Delivery]]></value>
<group>modules-payment</group>
</definition>
<definition>
<key>payment_cod_method_title</key>
- <value><![CDATA[Cash on Delivery by Shippings]]></value>
+ <value><![CDATA[Cash on Delivery]]></value>
<group>modules-payment</group>
</definition>
</definitions>
@@ -53,10 +53,6 @@ public function __construct() {
}
}
- $valid_shipping = preg_split("/[,]/", MODULE_PAYMENT_COD_ACCEPTED_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 b11cfcb

Please sign in to comment.