Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2006
    Location
    Melbourne, VIC
    Posts
    99
    Plugin Contributions
    0

    Bug in Australia Post Shipping Module

    Hi,

    I have found a bug with the Australia Post Shipping module and require help in fixing it. I believe that I know what needs to be done but I don't have an indepth knowledge of the ZenCart software or php.

    In australia_post_module_3.02.zip file \catalog\includes\modules\shipping\auspostair.php line 120 states

    Code:
    $shipping_auspostair_cost = $charge;
    where $charge is the value returned ifrom the Australia Post Shipping calculator called in line 80.

    http://drc.edeliver.com.au

    The value returned in $charge Is always in Australian Dollars AUD

    Then, in line 112 we have;

    Code:
    $shipping_auspostair_cost = $charge;
    and in line 115 we have

    Code:
       $this->quotes = array('id' => $this->code,
                                'module' => MODULE_SHIPPING_AUSPOSTAIR_TEXT_TITLE,
                                'methods' => array(array('id' => $this->code,
                                                         'title' => $shipping_auspostair_method,
                                                         'cost' => ($shipping_auspostair_cost + MODULE_SHIPPING_AUSPOSTAIR_HANDLING) + $insurance)));

    The bug is that MODULE_SHIPPING_AUSPOSTAIR_HANDLING and $insurance are in the Admin set default currency, not necessarly Australian dollars AUD.

    In my case I have set the Default currency to USD$. With the code as it is, it is interpreting the value in $charge as USD$

    That is; when the calculator returns $8.50 for a postage charge, the module is interpreting it as USD$8.50, not AUD$8.50

    This results in the customer being over charged!

    As I see it, the fix is extremely simple. the value $charge
    returned by the Australia Post calculator needs to be divided by the AUD currency rate to convert it to the default currency. Something like;

    replace line 112 with;

    Code:
    $shipping_auspostair_cost = $charge/ AUD_CURRENCY_RATE;

    How do I replace AUD_CURRENCY_RATE with the AUD currency rate set under Admin->Localization->Curriencies?

    Or is there a conversion routine I can call?

    I tried;

    Code:
    $shipping_auspostair_cost = $charge/ currencies->value(AUD);

    but it didn't work

    I presume I need to also do some type conversion/formating as well


    Can someone please help me? I'm desperate.


    Thanks,

    Peter

  2. #2
    Join Date
    Jun 2003
    Posts
    33,825
    Plugin Contributions
    0

    Default Re: Bug in Australia Post Shipping Module

    Peter-

    Thank you for the report, but AusPost is a contributed module, so I am moving your post to the appropriate forum.

  3. #3
    Join Date
    Aug 2006
    Posts
    5
    Plugin Contributions
    0

    Default Re: Bug in Australia Post Shipping Module

    Hi Peter,

    First time post here and looking at installing the Australia Post module for ourselves. Have you found many problems with this module or have you been able to overcome them ?

    Regards,

    Joel

  4. #4
    Join Date
    Jun 2006
    Location
    Melbourne, VIC
    Posts
    99
    Plugin Contributions
    0

    Default Re: Bug in Australia Post Shipping Module

    Hi Joel,

    It's fairly straight forward to install and use. The bug I've reported only occurs when when your default currency is not Aussie Dollars. Not the normal situation though.

    I must say I'm dissapointed in the lasck of support on this forum though.

    Cheers,

    Peter.

  5. #5
    Join Date
    Aug 2006
    Posts
    1
    Plugin Contributions
    0

    Default Re: Bug in Australia Post Shipping Module

    Could anyone tell me where I can download this module.

    Thanks anyway but I found it!
    Last edited by rwarne; 11 Aug 2006 at 04:02 PM.

  6. #6
    Join Date
    Sep 2010
    Posts
    203
    Plugin Contributions
    0

    Default Re: Bug in Australia Post Shipping Module

    I've got my Zone set to Queensland, Australia. Aust Post Shipping Calculator seems to calculate a higher cost to ship a product from Queensland to Queensland than from Queensland to Victoria ??? Weird.

    Any Ideas why ?

 

 

Similar Threads

  1. Australia Post Shipping with US currency as default.
    By Peter Homann in forum Addon Shipping Modules
    Replies: 9
    Last Post: 18 May 2010, 01:35 PM
  2. Flat rate shipping module
    By tammy_kenny in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 25 Jul 2006, 01:07 AM
  3. Disable entire shipping module?
    By jdl in forum Built-in Shipping and Payment Modules
    Replies: 6
    Last Post: 5 Jun 2006, 05:51 PM

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
  •