Hi,
I did what you suggested.
-
I cloned the payment module Direct Bank Deposit and customised to Swiss Bank details.
-
In Zone Definitions I named one -> Switzerland -> description = Payment in details chose -> All Zones
-
In the Admin settings of the Payment module I chose Switzerland as Payment zone.
I feel I have done everything as suggested, but still all zones can use this payment method, where as I feel only the Swiss should have this Payment option available :frusty:
Here is a copy of the bit of code that shows the line you suggested. It's there.....
}
function install() {
global $db;
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable CHPostcheck Module', 'MODULE_PAYMENT_CHPOSTCHECK_STATUS', 'True', 'Do you want to accept chpostcheck payments?', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
$db->Execute("insert into " . TABLE_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_CHPOSTCHECK_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_CHPOSTCHECK_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Routing Number', 'MODULE_PAYMENT_CHPOSTCHECK_ROUTING', '000-000-000', '9 digit routing number in the format 000-000-000', '6', '1', now());");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Bank Account No.', 'MODULE_PAYMENT_CHPOSTCHECK_ACCNUM', '12345678', 'Bank Account No.', '6', '1', now());");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Bank Account Name', 'MODULE_PAYMENT_CHPOSTCHECK_ACCNAM', 'Joe Bloggs', 'Bank Account Name', '6', '1', now());");
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Bank Name', 'MODULE_PAYMENT_CHPOSTCHECK_BANKNAM', 'The Bank', 'Bank Name', '6', '1', now());");
$db->Execute("insert into " . TABLE_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_CHPOSTCHECK_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
}
I would like to add that I have tried using some of the standard payment modules included with ZC and selected a Zone, but they also show up for ALL zones when going through checkout. :(
I am missing a small important detail to make this work.................