Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2010
    Posts
    250
    Plugin Contributions
    0

    red flag How is the Austpost Shipping Module Called ?

    How is the Austpost free Shipping Module Called ? i.e. austpost.php

    Parts of it seem to get called twice unnecessarily.

    For example the function quote() on about line 73, gets called twice. I placed an echo debug at the top of this function which demonstrated that it was called twice.

    function quote($method = '') {
    echo " TEST DEBUG Quote() : ";

    Also the main loop that goes through the cart also seems to get called twice unnecessarily. i.e. the For Next loop that starts about line 156.

    for($x = 0 ; $x < count($order->products) ; $x++ ) {

    Thus when I debug the code, I'm getting double debug statements everywhere.

    It just seems strange and somewhat redundant and inefficient. Thus that's why I'm wondering what the calling module is and or where the function Quote() is called from ?

    Any ideas ? It would be nice to get just one debug statement instead of two.
    Last edited by HeyIts007; 3 Jun 2011 at 06:59 PM.
    Thanks,
    007

  2. #2
    Join Date
    Sep 2010
    Posts
    250
    Plugin Contributions
    0

    red flag Re: How is the Austpost Shipping Module Called ?

    OK to clarify it was in context of using the Shipping Estimator. I've since found shipping_estimator.php to be the script that calls the Quote() function in AustPost.php I'm speculating that if one selects a non standard or non default shipping option ( perhaps like Express Post etc... ) in the AustPost module, this extra call to Quote() function overrides the previous default call that I presume might be used for regular parcel post with no customer options selected. Thus I'm not sure if this is a code optimisation issue or not.
    Last edited by HeyIts007; 3 Jun 2011 at 08:16 PM.
    Thanks,
    007

 

 

Similar Threads

  1. AUSTPost module
    By Trinity in forum Addon Shipping Modules
    Replies: 320
    Last Post: 2 Oct 2009, 01:53 PM
  2. Austpost module v 3.02
    By pchappy in forum Addon Shipping Modules
    Replies: 1
    Last Post: 23 Feb 2009, 02:41 PM
  3. where are the functions in a module called?
    By stenio123 in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 19 Jun 2007, 08:40 PM
  4. Rod G's Austpost module - estimate shipping not showing?
    By caznjj in forum Addon Shipping Modules
    Replies: 0
    Last Post: 27 Apr 2007, 01:00 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
  •