Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2010
    Posts
    263
    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
    263
    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. v139h creating a Shipping Module called mycourier
    By hegutierrezm in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 8 Mar 2013, 04:02 PM
  2. Can the ozCommerce AustPost module be put in zen-cart?
    By rachalmers in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 21 Jan 2010, 07:36 AM
  3. Replies: 3
    Last Post: 8 Jul 2008, 02:18 AM
  4. 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
  5. 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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR