Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005
    Posts
    460
    Plugin Contributions
    0

    Default 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.

  2. #2
    Join Date
    Sep 2005
    Posts
    460
    Plugin Contributions
    0

    Default Re: How to add a new shipping module to ot_cod_fee.php?

    Actually all above changes were definitely ok but the classic mistake was to download it to the folder "order_total" under languages instead of modules!
    That's fine so then.

    Now I just need to get the COD fee NOT appearing when customer have chosen "Store pickup". It is just confusing for people.

    Elli
    I may be blond but at least I found Zen.

 

 

Similar Threads

  1. v151 *[Done v1.6.0] Incorrect comparison in ot_cod_fee.php
    By lat9 in forum Bug Reports
    Replies: 1
    Last Post: 6 Apr 2013, 12:16 AM
  2. How to add Manufacturer to What's New module?
    By wmorris in forum General Questions
    Replies: 2
    Last Post: 18 Nov 2009, 06:47 AM
  3. How to override header_php.php or how to add a new field to order confirmation email
    By monkeytown in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 25 Jan 2008, 06:01 PM
  4. how to add a new page like index.php?
    By soundworker in forum Templates, Stylesheets, Page Layout
    Replies: 13
    Last Post: 25 Sep 2006, 12:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg