How to add a new shipping module to ot_cod_fee.php?
We have a shipping module called "postofficeX" for ZC. It is based on a table rate module and works fine but we can't get it added for the order total module in order to get COD fee charged.
We added these lines in the module in their respective places in the ot_cod_fee.php:
1st line added...
if (substr_count($_SESSION['shipping']['id'], 'postofficeX') !=0) $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_POSTOFFICE);
2nd line that was modified
function keys() {
return array('MODULE_ORDER_TOTAL_COD_STATUS', 'MODULE_ORDER_TOTAL_COD_SORT_ORDER', 'MODULE_ORDER_TOTAL_COD_FEE_FLAT', 'MODULE_ORDER_TOTAL_COD_FEE_FREE', 'MODULE_ORDER_TOTAL_COD_FEE_FREESHIPPER', 'MODULE_ORDER_TOTAL_COD_FEE_FREEOPTIONS', 'MODULE_ORDER_TOTAL_COD_FEE_PERWEIGHTUNIT', 'MODULE_ORDER_TOTAL_COD_FEE_ITEM', 'MODULE_ORDER_TOTAL_COD_FEE_TABLE', 'MODULE_ORDER_TOTAL_COD_FEE_UPS', 'MODULE_ORDER_TOTAL_COD_FEE_USPS', 'MODULE_ORDER_TOTAL_COD_FEE_ZONES', 'MODULE_ORDER_TOTAL_COD_FEE_AP', 'MODULE_ORDER_TOTAL_COD_FEE_DP', 'MODULE_ORDER_TOTAL_COD_FEE_SERVICEPAKKE', 'MODULE_ORDER_TOTAL_COD_FEE_POSTOFFICE', 'MODULE_ORDER_TOTAL_COD_FEE_FEDEX', 'MODULE_ORDER_TOTAL_COD_TAX_CLASS');
}
3rd line added
$db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('COD Fee for PostofficeX', 'MODULE_ORDER_TOTAL_COD_FEE_POSTOFFICE', 'FI:60', 'PostofficeX: <Country code>:<COD price>, .... 00 as country code applies for all countries. If country code is 00, it must be the last statement. If no 00:9.99 appears, COD shipping in foreign countries is not calculated (not possible)', '6', '13', now())");
So this Postoffice module just won't appear to our order total configuration visible.
What could be the issue?
I may be blond but at least I found Zen.