Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2005
    Posts
    30
    Plugin Contributions
    0

    Default Australia Post and COD Fee

    In Australia the basic COD Fee is a flat $9.00

    I have the australia Post module installed, to get zen cart to add a flat fee of $9.00 on the totals page using auspost or auspostexpress you set the COD Fee for FLAT in Admin / Modules/ Order Totals

    to AU:9.00

    then edit file includes/modules/order_total/ot_cod_fee.php

    by adding the 2 following lines( I am using only auspost and auspostexpress I presume it will work with other aus post modules, you'll just have to edit the lines for them )
    after line 53 ( you will see the code looks similar to the lines immediately above)


    if (substr_count($_SESSION['shipping']['id'], 'auspost') !=0) $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_FLAT);

    if (substr_count($_SESSION['shipping']['id'], 'auspostexpress') !=0) $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_FLAT);




    hope this helps someone else, took me long enough to figure it out
    Last edited by drakky; 23 Jun 2006 at 02:53 AM. Reason: spelling

  2. #2
    Join Date
    Jul 2005
    Posts
    30
    Plugin Contributions
    0

    Default Re: Australia Post and COD Fee

    whooopsie , scratch the auspostexpress line above I just checked the Australiapost web site you can't have COD with express post , only with the
    auspost

    sorry

  3. #3
    Join Date
    Jul 2005
    Posts
    30
    Plugin Contributions
    0

    Default Re: Australia Post and COD Fee

    Hi
    if anone could help as this is driving me mad lol, I am trying to disable the cod if Auspost express is selected , I have read 1000's of pages in htis forum and the closest I could come up with is this however it doesn't work as it disables cod for austpost parcel post as well , here's the code I edited in cod.php

    // disable the module if the order only contains virtual products
    if ($this->enabled == true) {
    if ($order->content_type != 'physical') {
    $this->enabled = false;
    }
    }
    // disable the module if the order is not via auspost
    if ($this->enabled == true) {
    if ($order->shipping_module_code != 'auspost') {
    $this->enabled = false;
    }
    }
    }



    on the payment method step 2 page I get regardless if I select auspost or auspost express

    Payment Method
    This is currently the only payment method available to use on this order.

    Direct Bank Deposit

    Direct Bank Deposit is the only other method I am wanting to use , could anyone help please?
    Last edited by drakky; 28 Jun 2006 at 09:32 PM. Reason: forgot to add something

  4. #4
    Join Date
    Jul 2005
    Posts
    30
    Plugin Contributions
    0

    Default Re: Australia Post and COD Fee

    this code works in oscommerce but not in zencart , I can't understand it the module is basically just the oscommerce one that has been adapted to zencart,
    does anyone have any ideas please???

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Australia Post and COD Fee

    If you were to trace the word: flat in the ot_cod_fee.php ...

    You would need to make a clone or matching setting for your code in your auspost.php module ...

    Once you have all lines cloned ...

    You would need to uninstall and reinstall and reconfigure the Order Totals ... COD Fee ... module so that the new settings can be configured ...

    You have to be careful on both spelling and case of the "buzz" word used ...

    Peek at how flat or item or usps is done to get a feel for the pattern ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Australia Post and COD Fee

    NOTE: not sure if you are still using these two lines:

    PHP Code:
    if (substr_count($_SESSION['shipping']['id'], 'auspost') !=0$cod_zones split("[:,]"MODULE_ORDER_TOTAL_COD_FEE_FLAT);

    if (
    substr_count($_SESSION['shipping']['id'], 'auspostexpress') !=0$cod_zones split("[:,]"MODULE_ORDER_TOTAL_COD_FEE_FLAT); 
    But you should not be using _FLAT in them ... that is for the flat shipping ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Jul 2005
    Posts
    30
    Plugin Contributions
    0

    Default Re: Australia Post and COD Fee

    Quote Originally Posted by Ajeh
    If you were to trace the word: flat in the ot_cod_fee.php ...

    You would need to make a clone or matching setting for your code in your auspost.php module ...

    Once you have all lines cloned ...

    You would need to uninstall and reinstall and reconfigure the Order Totals ... COD Fee ... module so that the new settings can be configured ...

    You have to be careful on both spelling and case of the "buzz" word used ...

    Peek at how flat or item or usps is done to get a feel for the pattern ...
    ok i added the following lines right after the respecrive FLAT versions


    if (substr_count($_SESSION['shipping']['id'], 'auspost') !=0) $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_AUSPOST);


    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_AUSPOST', (etc etc)


    $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 AUSPOST', 'MODULE_ORDER_TOTAL_COD_FEE_AUSPOST', 'AU:9.00', 'AUSPOST: <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', '5', now())");




    and this code in cod.php but it still doesn't work

    // class methods
    function update_status() {
    global $order, $db , $shipping;





    // disable if shipping is not auspost - start
    if ($shipping['id']!="auspost_auspost") {
    $this->enabled = false;
    }
    // disable if shipping is not auspost - end

    yet in oscommerce you don't have to edit ot_cod_fee.php you only have to edit the cod.php for it to work correctly

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Australia Post and COD Fee

    You could always go back to osC ... or you can rewrite the COD Fee module if you like ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Jul 2005
    Posts
    30
    Plugin Contributions
    0

    Default Re: Australia Post and COD Fee

    Quote Originally Posted by Ajeh
    You could always go back to osC ... or you can rewrite the COD Fee module if you like ...
    pretty much the answer I'd expected .I think the reason zen cart isn't getting the community that it should have is because of this attitude.

    basically zen cart is oscommerce that has had some bits of it rewritten . I'm pretty sure there aren't many differences in the cod.php file, it should work but I have no idea why it won't.
    well thanks for your help

 

 

Similar Threads

  1. v150 Need some Help in COD. COD fee depending on order price
    By bratsangels in forum Built-in Shipping and Payment Modules
    Replies: 20
    Last Post: 16 Sep 2012, 12:53 PM
  2. Australia Post and Dual Pricing Clash
    By Kitty in forum Addon Shipping Modules
    Replies: 3
    Last Post: 29 Dec 2007, 08:05 PM
  3. Question about COD Fee and DHL Shipping module
    By rkeppert in forum Addon Shipping Modules
    Replies: 7
    Last Post: 2 Sep 2006, 01:36 AM
  4. Australia Post module and COD
    By drakky in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 18 Jun 2006, 08:13 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR