If this is your first visit, check our documentation. To post, register or login.

ozpost shipping module

Started by rodg on 15 Mar 2009, 12:18 PM · Views: 404,156

Results 121 to 140 of 2,251
4 Jun 2009, 7:32 AM
#121
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Post #121 by rodg

australican:

What have I done this time? Is there a min weight or size for insurance on a sea mail package?

No, but all insurance options have a minimum value of $100, so if the order is less than this the insurance option doesn't show.

The solution is to enable registered mail too (which provides insurance up to $100).

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

4 Jun 2009, 7:58 AM
#122
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Post #122 by rodg

dw08gm:

Are there any known issues between Fast Easy Checkout & the OzPost modules.

Apparently AustPost is not compatible with FEC, as per http://www.numinix.com/forum/viewtopic.php?f=6&t=4&st=0&sk=t&sd=a

Could someone throw some light on the compatability issue with AustPost.

TIA

I've just done a search for more information regarding this problem, and apparently it is because the austpost module can't provide a valid quote on the first load because it has no way of knowing where the parcel is supposed to be delivered to, or the method of shipping that the user chooses.

This hasn't changed with the ozpost module, so the incompatibilty will still remain with the with ozpost module.

If anyone has any ideas how to overcome this I'll be more than happy to take them into consideration.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

5 Jun 2009, 9:49 AM
#123
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,024
Plugin Contributions:
2

Post #123 by dw08gm

RodG:

I've just done a search for more information regarding this problem, and apparently it is because the austpost module can't provide a valid quote on the first load because it has no way of knowing where the parcel is supposed to be delivered to, or the method of shipping that the user chooses.

This hasn't changed with the ozpost module, so the incompatibilty will still remain with the with ozpost module.

If anyone has any ideas how to overcome this I'll be more than happy to take them into consideration.

Cheers
Rod

I wonder whether Checkout Without Account (COWOA) resolves the problems:

http://www.zen-cart.com/wiki/index.php/Contribution:Integrated_Checkout_Without_Account

As a quick search of its forum yielded no mention of Austpost or ozpost, I will pose the question there ie http://www.zen-cart.com/forum/showthread.php?t=59189. Stay tuned.

11 Jun 2009, 4:47 AM
#124
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Post #124 by hayden

rod, im having issues where it seems to be reverting back to default config... it may be conflict with old austpost mod, ill try uninstalling it first

11 Jun 2009, 11:18 AM
#125
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Post #125 by rodg

hayden:

rod, im having issues where it seems to be reverting back to default config...

I'm not sure what you mean by this. Are you saying the new module keeps losing your settings?

hayden:

it may be conflict with old austpost mod, ill try uninstalling it first

There is no conflict between the ozpost and austpost modules. They are completely independent of each other.
However there is no point in running them both together. The reason for making them independent was to isolate the different servers being used, and it also enabled me to continue to run the old module on our own store while developing the new code at the same time in the same place.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

12 Jun 2009, 7:54 AM
#126
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Post #126 by hayden

ok i removed the old one and reinstalled the new one but im still having some issues where:

1- it will at times ignore my chosen methods and offer them all, and then if you go and choose 1 it doesnt add the cost at the next page.

2- it wont offer the flat rate if parameters exceed limits, ive had to hack it just to get the response:

see on line 69 of tpl_checkout_shipping_default.php:

  if ($quotes[$i]['module'] != '') { // Standard

this must be met to offer a radio button, but when your code returns from for example a length too big, the ['module'] is not set , nor is the ['id'] value, both needed from my observations.

im currently running through your code to find out where its going wrong...

12 Jun 2009, 8:18 AM
#127
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Post #127 by hayden

ok i worked out why its adding the disabled options, well enough to know it only happens when in debug mode....

12 Jun 2009, 8:22 AM
#128
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Post #128 by hayden

still got the issue with error options not being available: if i make the return after error line this:

        print_r ($this->quotes);
        return $this->quotes;

i get this :

 Array ( [icon] => Aussie Post  [methods] => Array ( [0] => Array ( [id] => Aussie Post  [title] => Aussie Post ERROR: (30+42.00) x 2cm exceeds the Maximum 140cm girth allowed. Using AP Flat Rate. [cost] => 25.00 ) ) ) 

and as i mentioned its missing the 'keys' to make zencart display the errors...

12 Jun 2009, 11:33 AM
#129
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Post #129 by hayden

thanks once again for this mod, and heres my chunk of changes i needed to make to allow the display and choice of error flat rate postage options:

    // Check for maximum length allowed
    if($parcellength > $MAXLENGTH_P)
    {
         $cost = $this->_get_error_cost($dest_country) ;

       if ($cost == 0) return  ;
   
        $methods[] = array( 'id' => $this->code, 'title' => $this->title . '<font color=#FF0000> ' . $parcellength . 'cm exceeds the Maximum 105cm length allowed.</font>'. $FlatText, 'cost' => $cost ) ;
        
        $this->quotes['icon'] = '';
        $this->quotes['id'] = $this->code;        $this->quotes['module'] = $this->title;
        $this->quotes['methods'] = $methods;   // set it
        $_SESSION['_ozpost_quotes'] = $this->quotes  ; 
        
        return $this->quotes;
    }  // exceeds AustPost maximum length. No point in continuing.



   // Check girth
    if($girth > $MAXGIRTH_P )
    {
         $cost = $this->_get_error_cost($dest_country) ;

       if ($cost == 0)  return  ;
      
        $methods[] = array( 'id' => $this->code,  'title' => $this->title . '<font color=#FF0000>(' . $parcelheight . "+" . $parcelwidth . ') x 2cm exceeds the Maximum 140cm girth allowed.</font>'. $FlatText, 'cost' => $cost ) ;
        
                $this->quotes['icon'] = '';
        $this->quotes['id'] = $this->code;
        $this->quotes['module'] = $this->title;
        $this->quotes['methods'] = $methods;   // set it
        $_SESSION['_ozpost_quotes'] = $this->quotes  ; 

              
        return $this->quotes;
    }  // exceeds AustPost maximum girth. No point in continuing.



    if ($parcelweight > $MAXWEIGHT_P)
    {
         $cost = $this->_get_error_cost($dest_country) ;

       if ($cost == 0)  return  ;
      
        $methods[] = array( 'id' => $this->code,  'title' => $this->title . '<font color=#FF0000>' . $sweight . 'Parcel Exceeds the 20kg Maximum allowed.</font>'. $FlatText , 'cost' => $cost ) ;
        
        
        
                $this->quotes['icon'] = '';
        $this->quotes['id'] = $this->code;
        $this->quotes['module'] = $this->title;
        $this->quotes['methods'] = $methods;   // set it
        $_SESSION['_ozpost_quotes'] = $this->quotes  ; 

          
        return $this->quotes;
    }  // exceeds AustPost maximum weight. No point in continuing.

:D

also, you need to look at why the nice big ozpost.jpg image/icon only shows for the error states and not the valid server quotes ... i hacked it the other way so its not shown for flat error rates but is for server quotes, but i wont bother posting that right now.... ;)

12 Jun 2009, 12:16 PM
#130
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Post #130 by rodg

hayden:

ok i removed the old one and reinstalled the new one but im still having some issues

You can't say I didn't try to tell you that removing the old module wouldn't make any difference.

hayden:

it wont offer the flat rate if parameters exceed limits, ive had to hack it just to get the response:

Strange how you are the only person so far that has reported a problem with this. No one else has had to hack the code.

hayden:

see on line 69 of tpl_checkout_shipping_default.php:

I don't know a thing about what the tpl_checkout code, nor do I need to.

hayden:

this must be met to offer a radio button,

I'll take you word on that. As I said, as the author of the shipping module I don't need to know what the checkout module is doing and more than I need to know how any of the other modules work.

hayden:

but when your code returns from for example a length too big, the ['module'] is not set , nor is the ['id'] value, both needed from my observations.

Would you also like to try to explain how or why no one else is having this problem? If I were you I'd be looking at something more relevent.

hayden:

im currently running through your code to find out where its going wrong...

That is entirely up to you, but for you own sanity you still need to keep in mind that is obviously working as it should for most, if not all others.

I'm happy to help in any way I can, but like my code, I am a very logical person, and it is difficult for me to give advice or suggestions when you are seemingly going off on an illogical tangent.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

12 Jun 2009, 12:26 PM
#131
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Post #131 by rodg

hayden:

ok i worked out why its adding the disabled options, well enough to know it only happens when in debug mode....

Yes, it is designed to do that. The debug code intentionally displays ALL results returned by the server. This is to help isolate possible reasons why certain selected methods don't show... for example, if trying to use Sea mail to send a parcel to New Zealand. - instead of making that particular quote unavailable (normal operation) it will show any errors returned by the server, in this case a 'Destination not available by Sea), or similar.

This is even mentioned when you enabled the debug


Enable Debug?
See how parcels are created from individual items.
Shows **all **methods returned by the server, including possible errors.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

12 Jun 2009, 12:27 PM
#132
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Post #132 by hayden

whichever , it wasnt working (for whatever reason) and now i got it working thats enough for me, if you dont think it needs any changes, fine. but trust me i tried reinstalling plenty of times, so logically there must have been some problem or it would have worked... maybe related to some other mod ...

12 Jun 2009, 12:40 PM
#133
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Post #133 by rodg

hayden:

also, you need to look at why the nice big ozpost.jpg image/icon only shows for the error states and not the valid server quotes ...

Yeah, there are still a couple of annoying issues with the code relating to the icons. I wasn't aware of this one, but I'll take a look into it (just in case it hasn't already been fixed along with other more recent changes).

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

12 Jun 2009, 12:50 PM
#134
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Post #134 by rodg

hayden:

whichever , it wasnt working (for whatever reason) and now i got it working thats enough for me, if you dont think it needs any changes, fine. but trust me i tried reinstalling plenty of times,

I don't dispute that at all.

hayden:

so logically there must have been some problem or it would have worked...

I agree, and I also acknowledge that you did find a problem else you wouldn't have gone to the trouble you have to fix it.

hayden:

maybe related to some other mod ...

Maybe, maybe not, and maybe we'll never know for sure on account of the fact that you have elected to go off on your own to fix the problem. I've no issues with that either, it is your choice, but it is still better for you to work with me rather than for (or against) me, because that is the only way you can be assured you won't have to repeat your patches and fixes in future releases.

Hopefully this makes some kind of sense to you?

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

11 Jul 2009, 5:40 PM
#135
myval avatar

myval

New Zenner

Join Date:
Nov 2004
Posts:
19
Plugin Contributions:
0

Post #135 by myval

Hi guys,

I am having bit of a trouble with OZpost. When I click on "Estimate Shipping" I end up with empty screen. But I tried this module on another hosting account and it works fine. Is there anything in particular the hosting needs to have on/ off? I have tried curl on/off no difference. The website is https://www.euromodels.com.au and debug is on, if anyone can have a look and let me know what to do will be really appreciated.

thank you
Josef

11 Jul 2009, 5:45 PM
#136
myval avatar

myval

New Zenner

Join Date:
Nov 2004
Posts:
19
Plugin Contributions:
0

Post #136 by myval

And itheresting not response time is -xxx. does this mean that if I click that number of time the time start to go back??? I am being silly! :-)

11 Jul 2009, 5:54 PM
#137
lowlyworm avatar

lowlyworm

New Zenner

Join Date:
Mar 2009
Posts:
19
Plugin Contributions:
0

Post #137 by lowlyworm

Hello,
Rod would have a much better idea than me, but you could try installing a Debug Error Logging Utility in case something is bombing out

Debug Error Logging Utility

It saved me a lot of time tracking down some other problems (not related to this), and it may not help at all in this case.. but as it's nearly 4 am here and I'm feeling a bit tired to start looking through code ;-)

I just happen to be an RC model fan too (I wasn't sure what type of models I was going to find when I saw the link ;-))

David

12 Jul 2009, 1:14 AM
#138
myval avatar

myval

New Zenner

Join Date:
Nov 2004
Posts:
19
Plugin Contributions:
0

Post #138 by myval

Hi,

Thank you for your reply. the debug file is helpful, thanks.
this is the error it spit out:
[12-Jul-2009 11:02:05] PHP Fatal error: Cannot instantiate non-existent class: simplexmlelement in /home/eurom/public_html/shop/includes/modules/shipping/ozpost.php on line 345

I guess that is appache/ php problem isn't it?

thank you
JOsef

12 Jul 2009, 2:30 AM
#139
lowlyworm avatar

lowlyworm

New Zenner

Join Date:
Mar 2009
Posts:
19
Plugin Contributions:
0

Post #139 by lowlyworm

Hi,
Cool, I'm glad it found something useful!

I just had a bit of a search around and apparently the SimpleXML parser requires PHP5, do you know what version of PHP is running where you are having troubles?

You can make a new php page, say serverinfo.php

<?php phpinfo(); ?>

and it should show you all the server info when you call the page in a browser. Delete the file off the server when you're finished though :) I think there's a similar file that comes with the installation. The browser should be able to show the output without needing to including <html><body> tags etc..

If they're running PHP4, maybe you can ask them to upgrade or move you to a server with PHP5 on..

David

12 Jul 2009, 4:52 AM
#140
myval avatar

myval

New Zenner

Join Date:
Nov 2004
Posts:
19
Plugin Contributions:
0

Post #140 by myval

Alright!!! That's it! PHP Version 4.4.8
Thank you for your help.
Josef