Page 3 of 226 FirstFirst 123451353103 ... LastLast
Results 21 to 30 of 2252
  1. #21
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: ozpost shipping module

    Quote Originally Posted by remoteone View Post
    \includes\modules\shipping\ not /includes/languages/english/modules/shipping/ as I understand it
    I should also mention that the back slashes \ are for the Windows path names. Apache uses the forward slashes / for the URL paths.

    Cheers
    Rod

  2. #22
    Join Date
    Jan 2009
    Location
    Macclesfield, South Australia
    Posts
    102
    Plugin Contributions
    0

    Default Re: ozpost shipping module

    I created an empty ozpost.php file in /includes/languages/english/modules/shipping/ (the / vs \ path symbolism is simply a case of me pasting the text as is)

    The first errors have gone but still getting this error:
    in admin> modules >shipping

    Warning: Missing argument 4 for template_func::get_template_dir(), called in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zc1\includes\modules\shipping\ozpost.php on line 67 and defined in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zc1\includes\classes\template_func.php on line 42

    Warning: Missing argument 4 for template_func::get_template_dir(), called in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zc1\includes\modules\shipping\ozpost.php on line 69 and defined in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zc1\includes\classes\template_func.php on line 42

    Warning: Missing argument 4 for template_func::get_template_dir(), called in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zc1\includes\modules\shipping\ozpost.php on line 70 and defined in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zc1\includes\classes\template_func.php on line 42

    Warning: Missing argument 4 for template_func::get_template_dir(), called in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zc1\includes\modules\shipping\ozpost.php on line 97 and defined in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zc1\includes\classes\template_func.php on line 42

    Warning: Missing argument 4 for template_func::get_template_dir(), called in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zc1\includes\modules\shipping\ozpost.php on line 97 and defined in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zc1\includes\classes\template_func.php on line 42

    Warning: Missing argument 4 for template_func::get_template_dir(), called in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zc1\includes\modules\shipping\ozpost.php on line 97 and defined in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zc1\includes\classes\template_func.php on line 42

    These last lines are repeated many times.

    Thats a serious beard you've got going there by the way !
    Thanks
    Last edited by remoteone; 29 Mar 2009 at 07:27 AM.

  3. #23
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: ozpost shipping module

    Quote Originally Posted by remoteone View Post
    The first errors have gone but still getting this error:
    in admin> modules >shipping

    Warning: Missing argument 4 for template_func::get_template_dir(), called in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zc1\includes\modules\shipping\ozpost.php on line 67 and defined in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\zc1\includes\classes\template_func.php on line 42
    Still clutching at straws, but could you please try editing /modules/shipping/ozpost.php

    Locate the line that reads

    global $order, $db, $template, $ipath, $ipath2 ;

    and add $current_page_base as another global.

    Thanks,
    Rod

  4. #24
    Join Date
    Mar 2009
    Posts
    19
    Plugin Contributions
    0

    Default Re: ozpost shipping module

    Hello,
    I created a blank ozpost.php in the appropriate location (/var/www/includes/languages/english/modules/shipping/ozpost.php) and that solved the first one.

    Next is the parameter problem "Missing argument 4 for template_func::get_template_dir()"

    The method is declared in template_func.php as:

    function get_template_dir($template_code, $current_template, $current_page, $template_dir, $debug=false)

    But is being called in ozpost.php as

    $template->get_template_dir('ozpost_del.jpg', $ipath,$ipath2)

    Your old AustPost module makes the call with 4 params.. How is get_template_dir declared in your version of Zen Cart? (I have the latest version installed 1.3.8a).. If I add a default blank parameter it's happy, but that might be masking something else..

    Anyway, with those fixes it seems to install correctly and works :-)

    A Registered International Parcel option would be awesome (now available for parcels up to 2 kg)

    Thanks for your effort in supplying this,
    David

  5. #25
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: ozpost shipping module

    Quote Originally Posted by LowlyWorm View Post
    Hello,
    I created a blank ozpost.php in the appropriate location (/var/www/includes/languages/english/modules/shipping/ozpost.php) and that solved the first one.

    Next is the parameter problem "Missing argument 4 for template_func::get_template_dir()"

    The method is declared in template_func.php as:

    function get_template_dir($template_code, $current_template, $current_page, $template_dir, $debug=false)

    But is being called in ozpost.php as

    $template->get_template_dir('ozpost_del.jpg', $ipath,$ipath2)

    Your old AustPost module makes the call with 4 params.. How is get_template_dir declared in your version of Zen Cart? (I have the latest version installed 1.3.8a).. If I add a default blank parameter it's happy, but that might be masking something else..

    Anyway, with those fixes it seems to install correctly and works :-)

    A Registered International Parcel option would be awesome (now available for parcels up to 2 kg)

    Thanks for your effort in supplying this,
    David
    Great. I do believe we are getting somewhere :-)

    Unless I'm mistaken the 'missing parameter' is supposed to be supplied by the $ipath variable. IOW, $ipath is supposed to expand to
    "value1, $value2" (without the quotes), but it appears it is being seen as a single value (same data, but with quotes).

    I'm not sure why it is working correctly on my system(s), perhaps it is due to a subtle difference between Linux and Windows?

    As for the Registered International parcels, I'd swear blind that I'd catered for that. I guess this also warrants further investigation. On the plus side, even if it hasn't been catered for, the way this version is designed it is actually quite a trivial task to add new methods, so this WILL be supported (or fixed) in the very near future.

    Quick question, where did you add the blank parameter in order to get it working? (between the two $ipaths? before them? or after them?)
    Trying to save myself a little work :-)

    Cheers
    Rod

  6. #26
    Join Date
    Mar 2009
    Posts
    19
    Plugin Contributions
    0

    Default Re: ozpost shipping module

    Hi,
    I made the modification to /var/www/includes/classes/template_func.php purely to see if everything else worked correctly by hiding that 4th param error.

    Changed

    function get_template_dir($template_code, $current_template, $current_page, $template_dir, $debug=false)

    to

    function get_template_dir($template_code, $current_template, $current_page, $template_dir = '', $debug=false)

    I'm not a PHP coder (only started looking through it yesterday), and all this dynamic typing scares me a little compared to strongly typed lanugages which I'm used to. It seems much harder to tell what you are dealing with when you have a variable i.e. I have to look up to try and find what was assigned to it.. anyway, I'm getting side tracked about PHP!

    I'm interested in what you mention about $ipath expanding, is that a feature of PHP where a variable can expand to fill more than one parameter? What type does the variable have to be?

    By the way, I have the latest version of PHP5 installed (or very close to).

    David

  7. #27
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: ozpost shipping module

    Quote Originally Posted by LowlyWorm View Post
    Hi,
    I made the modification to /var/www/includes/classes/template_func.php purely to see if everything else worked correctly by hiding that 4th param error.
    Changed
    function get_template_dir($template_code, $current_template, $current_page, $template_dir, $debug=false)
    to
    function get_template_dir($template_code, $current_template, $current_page, $template_dir = '', $debug=false)
    I'd strongly advise against changing that particular file (other than for debugging purposes). The reason being is that is one of the core zencart files and it can possibly cause lots of unforeseen problems because lots of modules, perhaps all them them will be dependent on it.
    It also means it'll need to be repatched any time zencart gets an upgrade.

    Quote Originally Posted by LowlyWorm View Post
    I'm not a PHP coder (only started looking through it yesterday), and all this dynamic typing scares me a little compared to strongly typed lanugages which I'm used to.
    I could argue that if you are used to strongly typed lanquages, the PHP should be a PoP (piece of pxss) <grin>

    Quote Originally Posted by LowlyWorm View Post
    It seems much harder to tell what you are dealing with when you have a variable i.e. I have to look up to try and find what was assigned to it.. anyway, I'm getting side tracked about PHP!
    LOL.

    Quote Originally Posted by LowlyWorm View Post
    I'm interested in what you mention about $ipath expanding, is that a feature of PHP where a variable can expand to fill more than one parameter? What type does the variable have to be?
    Actually, 'expanding' was probably a poor choice of words, and not really correct.

    Suppose we needed to pass two parameters to a function, we would typically use something like:

    thisfunction(valueA, valueB)

    Or in a strongly typed language

    thisfunction(int integerA, string stringA)

    What I have done (trying to avoid retyping the same thing in several different places) is to create a 3rd variable called $ipath (for IconPath)
    that concats the two paramters to be passed to the function. In other words, using the examples above
    $ipath = valueA + "," + valueB

    or, strongly typed, it would be:

    $ipath = "int " + integerA + "," + "string" + stringA

    So now when I call the function, instead of
    thisfunction(int integerA, string stringA) I am simply using
    thisfunction($ipath)

    In *most* cases/programs this technique would be useless/pointless, but since the icon path never changes during the programs execution it seemed like a practical thing to do.
    When I said 'expansion' I was implying that the function being called wouldn't be seeing "$ipath" as a single parameter, it would be recieving it as two separate values ie, valueA, comma, valueB.

    This clearly works on my system(s), but for some reason or another it isn't working on yours and at least two others (all windows based)

    I think I'll take the 'safe' way in fixing this one and pass the parameters in the more traditional manner rather than saving a few bytes of typing (which has now been 'wasted' in trying to sort out what the heck has gone wrong).

    Live and learn. (and frustate a few people in the process).

    Cheers, and thanks heaps for all the debugging. I'll try to get an updated release out in the next few days, after I've figured out what the heck happened to the registered overseas parcels.

    Rod

  8. #28
    Join Date
    Mar 2009
    Posts
    19
    Plugin Contributions
    0

    Default Re: ozpost shipping module

    Quote Originally Posted by RodG View Post
    I'd strongly advise against changing that particular file (other than for debugging purposes). The reason being is that is one of the core zencart files and it can possibly cause lots of unforeseen problems because lots of modules, perhaps all them them will be dependent on it.
    It also means it'll need to be repatched any time zencart gets an upgrade.
    Rod
    Hi Rod,

    I'd agree, I only changed it for debugging purposes (live server will be a fresh install when I've worked out all my mods etc :-))

    Thanks for the other info. You can't construct a string representing the combined parameters as they'd look at compile time and pass it at runtime in C++, Java etc. (as I'm sure you know :)).. however PHP seems to be a complete free for all.. ! hehe ;-)

    Let me know if I can do anything to help,
    Thanks!
    David

  9. #29
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: ozpost shipping module

    Quote Originally Posted by LowlyWorm View Post
    Thanks for the other info. You can't construct a string representing the combined parameters as they'd look at compile time and pass it at runtime in C++, Java etc. (as I'm sure you know :))
    I do, just as I'm sure you know by now that unlike C++, Java, etc, which are compiled, PHP is little more than a script.

    Quote Originally Posted by LowlyWorm View Post
    .. however PHP seems to be a complete free for all.. ! hehe ;-)
    David
    I'm never really sure if this is a blessing or a curse. As you say, it makes it a free for all, which makes it a pretty easy language to learn, but it also allows the ability to create lots of buggy code that simply couldn't exist in a strictly typed language.

    Mind you, PHP isn't the worst in this regard. Have you ever looked into Pyhon? It is the only language that I know where you can do something like:

    variable = "Hello World"
    print variable * 2
    and it will dutifully print out "Hello World Hello World".

    Now THAT's a free for all, but even odder is that Python is actually compiled and still allows this.

    Cheers
    Rod. (heading off to bed)

  10. #30
    Join Date
    Jan 2009
    Location
    Macclesfield, South Australia
    Posts
    102
    Plugin Contributions
    0

    Default Re: ozpost shipping module

    I should be in bed also,
    Looks like you've got a bit of work to do there Rod...
    I'm gonna wait 'till the ozpost module is all figured out... as if any module is ever "all figured out".. this is free-open-source
    Thanks for your efforts ...

 

 
Page 3 of 226 FirstFirst 123451353103 ... LastLast

Similar Threads

  1. v151 Product dimensions revert to 0 - using ozpost module
    By mpforum in forum General Questions
    Replies: 8
    Last Post: 18 Apr 2014, 09:49 AM
  2. Ozpost and module help
    By janelle in forum Addon Shipping Modules
    Replies: 2
    Last Post: 15 Jun 2012, 09:19 AM
  3. Ozpost Combine shipping !! Possible ?
    By toytemple in forum Addon Shipping Modules
    Replies: 7
    Last Post: 21 Jan 2010, 02:22 PM
  4. ozpost module problems
    By hspark in forum Addon Shipping Modules
    Replies: 19
    Last Post: 7 Dec 2009, 12:44 PM
  5. store pick-ip in ozpost shipping module
    By lazerweb in forum Addon Shipping Modules
    Replies: 2
    Last Post: 29 Jul 2008, 05:04 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